To average a range while ignoring zeros, use =AVERAGEIF(A1:A10,">0"). The criteria goes inside double quotes, and you can leave the third argument out — when you skip it, AVERAGEIF averages the same range it’s testing.
AVERAGE already ignores blank cells and text, but it treats a zero as a real value, which is why a column with several zeros pulls the average down. Note that ">0" also excludes negative numbers, so if your data can go below zero use =AVERAGEIF(A1:A10,"<>0") instead — that excludes only the zeros.
To average non-zero values that also meet another condition, switch to AVERAGEIFS: =AVERAGEIFS(B1:B10,B1:B10,"<>0",A1:A10,"North"). One thing to watch: if every value in the range is zero, there’s nothing left to average and the formula returns #DIV/0! — wrap it in =IFERROR(AVERAGEIF(A1:A10,"<>0"),0) if that’s possible in your data.
When you average values in Excel, you can write a formula in a way to exclude or ignore cells with a zero. In this tutorial, we will look at the way to write this average formula.

Ignore Zero while Averaging Values in Excel
You can use the below steps:
- First, enter the function AVERAGEIF in a cell.
- After that, in the first argument, refer to the range where you have values.
- Now, in the second argument, enter “>0”. This tells Excel to only include values greater than zero.
- In the end, enter a closing parenthesis and hit Enter to get the result.
With values in A1:A10, the formula looks like this:
=AVERAGEIF(A1:A10,">0")

You don’t need to specify the average_range, which is an optional argument. When you skip it, AVERAGEIF averages the values from the range that you specify in the range argument.
Below you can see the difference between the average result when you exclude zeros and when you include zeros.

Exclude Zeros but Keep Negative Numbers
There’s one thing you need to take care of with “>0”: it skips zeros, but it also skips negative numbers. If your data can have negative values (like profit and loss), use “<>0” (not equal to zero) instead, so only the zeros are left out:
=AVERAGEIF(A1:A10,"<>0")
For example, with 10, 0, -5, 20, 15 and 5 in the range, “>0” gives 12.5 (it leaves out the -5 too), while “<>0” gives 9. Blank cells and text are ignored either way.
Exclude Zeros with Another Condition
If you also want to average only the values for a specific item, use AVERAGEIFS. In the following formula, the values are in A1:A10 and the regions are in B1:B10, and it averages only the non-zero values for “East”:
=AVERAGEIFS(A1:A10,A1:A10,"<>0",B1:B10,"East")
Avoid the #DIV/0! Error When All Values Are Zero
When all the cells in the range are zero (or blank), there’s nothing left to average, and AVERAGEIF returns the #DIV/0! error. Wrap it in IFERROR to show 0 (or any other value) instead:
=IFERROR(AVERAGEIF(A1:A10,"<>0"),0)
Frequently Asked Questions
Does the AVERAGE function ignore zeros?
No. AVERAGE ignores blank cells and text, but it counts zeros as values. That’s why you need AVERAGEIF to leave them out.
How do I ignore both zeros and blank cells?
The same AVERAGEIF formula does both, as AVERAGEIF already skips blank cells. Just note that a formula that returns “” isn’t a number, so it’s skipped as well.
Can I use a cell reference instead of 0 in the criteria?
Yes. Join the operator and the cell with an ampersand, like this:
=AVERAGEIF(A1:A10,"<>"&C1)
Written by
Puneet Gogia
Microsoft MVP — Excel · Founder, Excel Champs
Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.