How to Calculate Minimum and Average While Ignoring Zeros in Excel
Question details
The user needs to calculate the minimum and average values of a dataset containing zeros, explicitly ignoring the zero values so they do not skew the final calculations.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Analyzing daily turnover values where future dates or days with no data are represented by zeros instead of blank cells.
- Observed behavior
- Standard MIN and AVERAGE functions include zeros, resulting in inaccurate minimum and average turnover calculations, and using newer functions sometimes results in a #NAME? error.
Identify the exact cell range containing your dataset and ensure that your zero values are formatted as numbers, not text.
Use AVERAGEIF and MINIFS Functions to Exclude Zeros
This is the most direct and modern method to calculate averages and minimums conditionally in supported versions of Excel.
The AVERAGEIF and MINIFS functions allow you to specify criteria for your calculations. By setting the criteria to "not equal to zero", Excel will completely ignore zero values in the selected range.
Click an empty cell where you want the average to appear. Type `=AVERAGEIF(A1:A7,"<>0")` (replace A1:A7 with your actual data range) and press Enter.
Select another empty cell for the minimum value. Type `=MINIFS(A1:A7,A1:A7,"<>0")` and press Enter.

Use Array Formulas for Older Excel Versions
If your Excel version returns a #NAME? error for MINIFS, you can use a combination of MIN and IF as an array formula instead.
Use WPS Spreadsheet for Advanced Formula Calculations
WPS Spreadsheet fully supports advanced conditional functions like AVERAGEIF and MINIFS, allowing you to exclude zero values from your data analysis effortlessly without compatibility errors.
- 1. Open Your Data: Launch WPS Spreadsheet and open your document containing the turnover data.
- 2. Apply AVERAGEIF: Click on the target cell and type `=AVERAGEIF(range, "<>0")` to find the average excluding zeros, then press Enter.
- 3. Apply MINIFS: In another cell, type `=MINIFS(range, range, "<>0")` to find the minimum excluding zeros, then press Enter.

Frequently Asked Questions
How do I ignore blank cells when calculating the average in Excel?
The standard AVERAGE function automatically ignores blank cells (empty cells). However, it does not ignore cells containing the number 0. If your future days are truly empty cells and not filled with zeros, you can simply use the standard `=AVERAGE(A1:A7)` formula.
Why am I getting a #NAME? error when using MINIFS?
The #NAME? error occurs when Excel does not recognize the function name. This typically happens if you are using an older version of Excel (such as Excel 2016 or earlier) that does not support the MINIFS function. You can use the array formula `=MIN(IF(A1:A7<>0, A1:A7))` instead.
Do I need to use quotation marks around the criteria in these formulas?
Yes, in functions like AVERAGEIF and MINIFS, logical operators combined with values (like "<>0") must be enclosed in double quotation marks so that Excel interprets the condition correctly.
Can I calculate the maximum value while ignoring zeros?
Yes, you can use the MAXIFS function similarly. For example, typing `=MAXIFS(A1:A7,A1:A7,"<>0")` will calculate the maximum value in the range while ignoring any zero values.




