How to Calculate an Average in Excel Ignoring Zero and Text Values
Question details
The user needs to calculate the average of a specific cell range while including only numeric values greater than zero, ensuring both zeroes and text entries are ignored in the calculation.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Performing statistical calculations on a dataset where zero values and text labels could skew the true mathematical average of valid positive numbers.
- Observed behavior
- The user seeks a specific formula that yields a clean average by bypassing any zeroes and non-numeric characters present in the designated range.
Ensure your target data range does not contain hidden error values (like #DIV/0! or #VALUE!), as these will cause the averaging formula to return an error even if criteria are set.
Use the AVERAGEIFS Function
The AVERAGEIFS function is the most efficient and modern method to calculate an average based on specific criteria, naturally ignoring text and bypassing zeroes when set to values greater than zero.
This formula applies a condition ">0" to the range. By default, Excel's mathematical functions ignore text strings, so applying the strictly positive criteria ensures zero values are skipped as well.
Click on the empty cell where you want the calculated average to appear.
Type the formula =AVERAGEIFS(B2:F2, B2:F2, ">0") into the formula bar. Replace B2:F2 with your actual data range.
Press the Enter key. The cell will now display the average of only the positive numbers within the range.

Use an Array Formula (For Older Excel Versions)
If you are using an older version of Excel that does not support the AVERAGEIFS function, you can combine the AVERAGE and IF functions into an array formula.
Calculate Complex Averages Seamlessly with WPS Spreadsheet
WPS Spreadsheet fully supports advanced statistical functions like AVERAGEIFS and array formulas. You can process complex datasets, filter out unwanted zeroes or text, and obtain accurate results instantly without worrying about compatibility issues.
- 1. Open your dataset in WPS: Launch WPS Spreadsheet and open the workbook containing the data you want to average.
- 2. Enter the formula: Click on your target cell and type =AVERAGEIFS(B2:F2, B2:F2, ">0").
- 3. Get the result: Press Enter to instantly calculate the average while ignoring all zeroes and text values.

Frequently Asked Questions
Does the standard AVERAGE function ignore text automatically?
Yes, the standard =AVERAGE() function automatically ignores cells containing text and empty cells. However, it includes zero values in its calculation, which reduces the final average. This is why a conditional function like AVERAGEIFS is needed when zeroes must also be skipped.
How can I calculate an average that ignores zeroes but includes negative numbers?
If your dataset has valid negative numbers and you strictly want to exclude zeroes, use the not-equal-to operator. The formula should be written as =AVERAGEIF(B2:F2, "<>0").
What if my range contains error values that break the AVERAGEIFS formula?
If cells contain errors like #DIV/0! or #N/A, AVERAGEIFS will return an error. To bypass errors, zeroes, and text, use the AGGREGATE function. For example, =AGGREGATE(1, 6, B2:F2/(B2:F2>0)) entered as an array formula will calculate the average while ignoring errors and non-positive numbers.




