Excel Formula to Find the Lowest Non-Zero Value by Segment Category

📅 Jun 27, 2026 📝 Sarah Miller

Isolating the lowest non-zero value within specific segment categories is a persistent challenge for data analysts. While standard lookup functions offer quick summaries, they often fail by pulling irrelevant zero placeholders. Fortunately, leveraging an advanced MINIFS array formula grants analysts the exact precision needed to bypass these empty data points.

However, this approach carries a stipulation: the criteria must explicitly define both the segment category (e.g., "Segment A") and the non-zero exclusion. Below, we will break down the exact syntax and step-by-step logic to implement this calculation seamlessly.

Excel Formula to Find the Lowest Non-Zero Value by Segment Category

In data analysis, financial modeling, and supply chain management, we frequently encounter datasets containing zero values. Often, these zeros act as placeholders representing unavailable stock, unquoted items, or missing data points. When trying to extract actionable insights, such as finding the most competitive vendor price or the lowest execution time, including these zeros will skew your results. The problem becomes even more complex when you need to group your data by a specific Segment Category and then retrieve (index) an associated value-like a Supplier Name or Product ID-corresponding to that lowest non-zero value.

This comprehensive guide will walk you through how to construct an Excel formula to solve this exact problem. We will cover modern approaches using MINIFS and XLOOKUP, traditional compatibility methods using INDEX, MATCH, and array structures, and cutting-edge dynamic array techniques using FILTER and SORT.

The Scenario and Sample Dataset

To ground these formulas in a real-world scenario, let's assume we have a procurement dataset tracking supplier quotes across different product segments. Our goal is to identify the Supplier offering the lowest non-zero price within a specific Segment.

Row A (Segment) B (Supplier) C (Price)
2 Electronics Supplier Alpha $0.00
3 Electronics Supplier Beta $120.00
4 Electronics Supplier Gamma $95.00
5 Furniture Supplier Alpha $45.00
6 Furniture Supplier Beta $0.00
7 Furniture Supplier Gamma $60.00
8 Electronics Supplier Delta $110.00

If we look at the Electronics segment, the prices are $0.00, $120.00, $95.00, and $110.00. The absolute minimum price is $0.00, but because we want the lowest non-zero value, our target price is $95.00, and the supplier we want to index/retrieve is Supplier Gamma.


Method 1: The Modern Approach (MINIFS + XLOOKUP)

If you are using Microsoft 365, Excel 2021, or Excel Web, the cleanest and most efficient way to solve this is by combining the MINIFS function with XLOOKUP. This avoids complex array syntax and makes your workbook significantly easier to maintain.

Step 1: Find the Lowest Non-Zero Value using MINIFS

The MINIFS function allows us to calculate a minimum based on multiple criteria. We can specify that the segment must match our target, and the price must be greater than zero.

=MINIFS(C2:C8, A2:A8, "Electronics", C2:C8, ">0")

How it works:

  • C2:C8 is the range containing the values we want to evaluate (Price).
  • A2:A8, "Electronics" filters our search to only look at rows where the Segment is "Electronics".
  • C2:C8, ">0" adds a crucial second filter, excluding any values that are less than or equal to zero.

This formula successfully evaluates to $95.00.

Step 2: Index the Supplier using XLOOKUP

Now that we know the minimum non-zero value, we need to find the supplier associated with both that value and the specific segment. We must use a double-condition lookup to ensure that if another segment has the same price, Excel doesn't pull the wrong supplier.

=XLOOKUP(1, (A2:A8="Electronics") * (C2:C8=MINIFS(C2:C8, A2:A8, "Electronics", C2:C8, ">0")), B2:B8)

Formula Breakdown:

  • (A2:A8="Electronics") returns an array of TRUE/FALSE values indicating segment matches: {TRUE; TRUE; TRUE; FALSE; FALSE; FALSE; TRUE}.
  • (C2:C8=MINIFS(...)) checks if the price equals our target minimum ($95.00), returning: {FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE}.
  • Multiplying these two arrays together acts as an AND logic gate, converting TRUEs to 1s and FALSEs to 0s, resulting in: {0; 0; 1; 0; 0; 0; 0}.
  • XLOOKUP searches for the value 1 within that combined array and returns the corresponding value from the Supplier range B2:B8, which is Supplier Gamma.

Method 2: Standard INDEX & MATCH (Compatible with Excel 2019 and older)

If you or your team are working on older versions of Excel that do not support XLOOKUP but do support MINIFS (Excel 2019), you can pair INDEX and MATCH with a similar Boolean array logic.

=INDEX(B2:B8, MATCH(1, (A2:A8="Electronics") * (C2:C8=MINIFS(C2:C8, A2:A8, "Electronics", C2:C8, ">0")), 0))

In this classic construction:

  • INDEX(B2:B8, ...) will return the supplier once we determine the exact row number.
  • MATCH(1, [Boolean Array], 0) searches for the first instance of 1 (representing the true matching row) with absolute precision (using the 0 match type).

Note: Since this is an array calculation, if you are using Excel 2016 or earlier, you must commit this formula by pressing Ctrl + Shift + Enter instead of just Enter. This wraps your formula in curly braces { }.


Method 3: The Dynamic Array Approach (FILTER & SORT)

For Microsoft 365 users who love elegant, readable, and highly dynamic code, the FILTER and SORT functions offer an incredibly intuitive alternative. Rather than performing lookup searches, we can simply filter our dataset down to matching entries, sort them, and grab the top result.

=INDEX(SORT(FILTER(B2:C8, (A2:A8="Electronics") * (C2:C8>0)), 2, 1), 1, 1)

Step-by-Step Logic:

  1. FILTER: FILTER(B2:C8, (A2:A8="Electronics") * (C2:C8>0)) filters the Supplier and Price columns. It removes all rows that are not in the Electronics segment or have a price of $0. This leaves us with a tiny sub-table:
    Supplier Beta$120.00
    Supplier Gamma$95.00
    Supplier Delta$110.00
  2. SORT: We wrap this filtered list inside SORT(..., 2, 1). This sorts our sub-table by its 2nd column (Price) in ascending order (1). Our sorted list becomes:
    Supplier Gamma$95.00
    Supplier Delta$110.00
    Supplier Beta$120.00
  3. INDEX: Finally, INDEX(..., 1, 1) targets the first row and the first column of this sorted, filtered table, returning exactly Supplier Gamma.

Handling Edge Cases and Errors

When working with real business data, things are rarely perfect. Below are common exceptions you should prepare your formulas to handle:

1. What if all values in a category are zero?

If all prices for "Electronics" are zero, MINIFS will return 0 because no values satisfy the ">0" condition. If you then search for a non-zero minimum, the match will fail, throwing an #N/A error. To prevent this, wrap your final formula in an IFERROR block:

=IFERROR(XLOOKUP(1, (A2:A8="Electronics") * (C2:C8=MINIFS(C2:C8, A2:A8, "Electronics", C2:C8, ">0")), B2:B8), "No valid quotes")

2. Handling duplicate minimum values

If both Supplier Gamma and a new Supplier Epsilon offer the same lowest price of $95.00, standard lookups (like XLOOKUP and MATCH) will return the first occurrence found in the list. If you need to see all suppliers offering the lowest price, you can combine FILTER with your MINIFS formula:

=FILTER(B2:B8, (A2:A8="Electronics") * (C2:C8=MINIFS(C2:C8, A2:A8, "Electronics", C2:C8, ">0")))

This will dynamically spill down and list every supplier that meets the cheapest criteria.

Summary of Best Practices

  • Use Excel Tables: Convert your ranges (A2:C8) into an official Excel Table (using Ctrl + T). This lets you use structured references like [Segment] and [Price], which automatically expand when new data is added.
  • Performance: For very large workbooks (tens of thousands of rows), MINIFS combined with XLOOKUP is highly optimized and will run significantly faster than old CSE array formulas.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.