How to Calculate Excel Average Excluding Errors, Zeros, and Specific Text
Question details
The user needs to calculate an average from a dataset while automatically ignoring zero values, spreadsheet errors, and specific text entries (such as employees marked with 't').

- Product
- Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Calculating accurate employee performance or financial averages without data noise from errors, empty metrics, or excluded personnel.
- Observed behavior
- Standard AVERAGE functions return calculation errors if the target range contains errors, and incorrectly skew the final result if zeros and excluded personnel rows are evaluated.
Ensure you are using a modern version of your spreadsheet software that supports dynamic array functions like FILTER. If you are using an older version, you may need to use a helper column approach instead.
Use a Nested FILTER and IFERROR Function
Combine AVERAGE with FILTER and IFERROR to create a dynamic formula that evaluates multiple exclusion criteria at once without needing helper columns.
This method replaces errors with zeros in the background, and then actively filters out any zeros and specific text conditions before the AVERAGE function processes the data.
Click on the empty cell where you want the final average result to be displayed.
Type the formula: =AVERAGE(FILTER(IFERROR(J6:J53,0),(IFERROR(J6:J53,0)<>0)*(A6:A53<>"t")))
Change J6:J53 to the column containing the numbers you want to average, and A6:A53 to the column containing your text criteria (like the employee markers).
Press Enter to execute the formula. The result will perfectly exclude the unwanted rows, errors, and zeros.

Use a Helper Column for Older Versions
If your software does not support the FILTER function, use a helper column to clean the data before calculating the average.
Calculate Complex Averages Seamlessly in WPS Spreadsheet
WPS Spreadsheet offers full support for advanced array formulas, nested functions, and dynamic arrays, making it incredibly easy to process complex datasets and calculate conditional averages.
- 1. Open your dataset: Launch WPS Spreadsheet and open your workbook containing the employee or financial data.
- 2. Apply the formula: Type your nested AVERAGE and FILTER formula into the designated result cell.
- 3. Press Enter: Hit Enter to immediately see the dynamically calculated average without any errors or manual filtering.

Frequently Asked Questions
Why does my AVERAGE function return a #DIV/0! error?
This happens if the range you are attempting to average contains only zero values or empty cells, or if your FILTER criteria was so strict that it excluded all available data rows.
Can I use AVERAGEIFS instead of FILTER for this?
AVERAGEIFS struggles with target ranges that inherently contain #N/A or #DIV/0! errors. You would need to handle the errors in the source data first, or use a helper column before applying AVERAGEIFS. The FILTER + IFERROR method is generally cleaner for dirty data.
How do I exclude multiple text conditions instead of just one?
You can add more multiplication conditions to the FILTER array. For example, to also exclude 'x', update the criteria section to: *(A6:A53<>"t")*(A6:A53<>"x").




