Fix Excel INDEX and AGGREGATE Returning 0 Instead of Text
Question details
The user is attempting to extract text based on specific conditions using a combined INDEX and AGGREGATE formula, but the function incorrectly returns 0, blank cells, or 'n/a' errors instead of the expected text values.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Filtering spreadsheet rows using an array-style formula to return text values where a specific numerical condition (such as values greater than 0.3) is met.
- Observed behavior
- The formula evaluates to 0, returns a blank, or displays an 'n/a' text string instead of successfully extracting the valid text from the indexed range.
Before altering your complex formulas, create a sanitized copy of your workbook without confidential data to safely test function adjustments and evaluate results.
Adjust AGGREGATE Options and Criteria to Exclude Errors
Modify the AGGREGATE function parameters to automatically ignore error values and explicitly filter out empty or 'n/a' cells from the calculation array.
The AGGREGATE function allows you to ignore hidden rows and error values by setting a specific behavior option. Additionally, if the source data contains blank cells or literal 'n/a' text, you must multiply your array criteria by conditions that exclude them to prevent 0 results.
Locate the AGGREGATE function inside your formula. Change the second argument (the options argument) to 6 (Ignore error values) or 7 (Ignore hidden rows and error values).
In the array criteria of your formula, append a check to exclude empty cells. For example, multiply your existing condition by (SourceRange<>"").
To prevent the formula from pulling 'n/a' entries, add another condition by multiplying the array by (SourceRange<>"n/a").
Press Enter (or Ctrl+Shift+Enter for older array setups) to apply the updated formula. The INDEX function will now bypass blanks and errors, returning the correct text.

Inspect Source Range for Formatting Discrepancies
Check the referenced data range to ensure it does not contain hidden zeroes or formatting that masks empty values as zeroes.
Easily Manage Complex Formulas with WPS Spreadsheet
WPS Spreadsheet provides comprehensive support for advanced array functions like INDEX and AGGREGATE. With its built-in formula evaluation tools and error-checking capabilities, you can quickly filter data and troubleshoot formula outputs in a familiar interface.
- 1. Open Your Workbook: Launch WPS Spreadsheet and open your existing .xlsx document containing the complex formulas.
- 2. Use Formula Evaluation: Select the cell returning a 0, navigate to the Formulas tab, and click 'Evaluate Formula' to step through the calculation and see where the blanks are pulled.
- 3. Apply Criteria Updates: Directly in the formula bar, adjust the AGGREGATE function's behavior argument to 6 to bypass errors, then hit Enter to apply the fix.

Frequently Asked Questions
Why does my INDEX formula return 0 when referencing a blank cell?
In spreadsheet applications, an INDEX function pointing to a truly empty cell evaluates it as the number 0. To resolve this, you can append an empty text string to the end of your formula (e.g., &"") to force the cell to display as a blank.
What does the '15' in the AGGREGATE function mean?
The number 15 is the function argument for SMALL. When combined with array formulas, AGGREGATE(15, ...) is used to find the nth smallest value in an array, which is a standard method for extracting multiple matching rows.
Is there an easier alternative to INDEX and AGGREGATE for filtering text?
Yes. If you are using updated spreadsheet software like Office 365 or the latest version of WPS Office, the FILTER function provides a much simpler and more intuitive way to extract text based on multiple conditions without resorting to complex AGGREGATE arrays.




