logo
search
Function Problems

How to Calculate Minimum and Average While Ignoring Zeros in Excel

John WilsonJohn Wilson Sep 30, 2026 870 views

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.

How to Calculate Minimum and Average While Ignoring Zeros in Excel
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.
Before you start

Identify the exact cell range containing your dataset and ensure that your zero values are formatted as numbers, not text.

Solution 1Recommended

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.

1
Calculate Average Excluding Zeros

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.

2
Calculate Minimum Excluding Zeros

Select another empty cell for the minimum value. Type `=MINIFS(A1:A7,A1:A7,"<>0")` and press Enter.

Use AVERAGEIF and MINIFS Functions to Exclude Zeros
Compatibility Check: If you receive a #NAME? error when using MINIFS, your version of Excel may not support this function (it was introduced in Excel 2019 and Microsoft 365). See the next solution for an alternative.
Calculate data efficiently in WPS Spreadsheet

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. 1. Open Your Data: Launch WPS Spreadsheet and open your document containing the turnover data.
  2. 2. Apply AVERAGEIF: Click on the target cell and type `=AVERAGEIF(range, "<>0")` to find the average excluding zeros, then press Enter.
  3. 3. Apply MINIFS: In another cell, type `=MINIFS(range, range, "<>0")` to find the minimum excluding zeros, then press Enter.
Fully supports AVERAGEIF, MINIFS, and other advanced Excel functions.Seamless compatibility with Microsoft Excel (.xlsx) file formats.Lightweight software with rapid startup and smooth performance.Free and user-friendly interface identical to modern spreadsheet tools.
microsoft office alternative - wps office

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.