Formula Errors

How to Fix Excel SMALL Function Returning 0 Instead of First Match

Olivia MillerOlivia Miller Nov 3, 2026 869 views

Question details

The user needs to correct an array or lookup formula where the SMALL function is incorrectly returning 0 instead of the first matching row.

How to Fix Excel SMALL Function Returning 0 Instead of First Match
Product
Excel
Device & OS
not provided
Scenario
Using the SMALL function in combination with ROW and IF logic to extract the first matching value or row number from a dataset.
Observed behavior
The formula returns 0 because the underlying conditional logic assigns zeros to non-matching rows, which the SMALL function interprets as the smallest numeric value.
Before you start

Select the cell containing your formula and identify the nested IF statement that evaluates your criteria before making adjustments.

Solution 1Recommended

Adjust IF Logic to Return FALSE or Errors for Non-Matches

Modify the underlying IF formula so that rows failing the condition evaluate to FALSE or an error like #DIV/0! instead of the number 0.

When using an array formula to find the smallest matching row, returning 0 for non-matching conditions forces the SMALL function to evaluate those zeros. Because 0 is typically smaller than your valid row numbers, SMALL will output 0. Changing the false condition to FALSE or an error bypasses this issue.

1
Locate the false condition

Click into the Formula Bar and find the IF statement nested inside your SMALL function (for example, IF(A1:A10="Match", ROW(A1:A10), 0)).

2
Remove the zero value

Delete the '0' from the value_if_false argument. You can simply leave it blank by closing the parenthesis early (e.g., IF(A1:A10="Match", ROW(A1:A10))), which automatically returns FALSE.

3
Force an error (Optional)

Alternatively, you can replace the 0 with 1/0 to intentionally generate a #DIV/0! error for non-matching rows.

4
Apply as an array formula

Depending on your Excel version, press Ctrl + Shift + Enter to execute the array formula correctly.

Adjust IF Logic to Return FALSE or Errors for Non-Matches
Why this works: The SMALL function ignores logical values like TRUE and FALSE, as well as text. By ensuring non-matches do not return a numeric zero, SMALL will correctly skip them and find your true first match.
Advanced Formula Editor

Troubleshoot Array Formulas Easily in WPS Spreadsheet

WPS Spreadsheet provides a robust and highly compatible environment for building, evaluating, and troubleshooting complex array formulas like SMALL, IF, and ROW.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the .xlsx file containing your problematic SMALL formula.
  2. 2. Evaluate the formula: Navigate to the 'Formulas' tab on the top ribbon and click on 'Evaluate Formula'.
  3. 3. Step through the logic: Click 'Evaluate' repeatedly to see exactly which part of your IF statement is generating the unwanted zeros.
  4. 4. Apply the fix: Edit the formula in the formula bar to remove the 0 for non-matches, and press Enter (or Ctrl+Shift+Enter) to save.
Fully compatible with Microsoft Excel formulas, functions, and array calculations (.xlsx formats).Includes an intuitive Formula Evaluation tool to step through arrays and spot incorrect zero values.Free to download and lightweight, ensuring smooth performance even with massive datasets.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the SMALL function count zero as a valid match?

In spreadsheet software, 0 is a standard numeric value. Since the SMALL function evaluates the dataset to find the k-th smallest number, it treats 0 as a valid entry, prioritizing it over larger positive row numbers.

How do I ignore errors in a SMALL array formula?

If you configure your formula to return #DIV/0! for non-matches, you can use the AGGREGATE function instead of SMALL. Using AGGREGATE(15, 6, array, k) applies function 15 (SMALL) and uses option 6 to explicitly ignore all errors.

Do I need to press Ctrl+Shift+Enter for SMALL functions?

If you are nesting an IF statement inside a SMALL function to check a range of cells against a criteria (e.g., SMALL(IF(...))), it operates as an array formula. In older versions of Excel, you must press Ctrl+Shift+Enter for the array to process correctly, though modern dynamic array engines handle this automatically.