Blank cells are skipped by AVERAGE, but explicit zeros drag the mean down. AVERAGEIF with a "<>0" criterion averages only the non-zero values.
The example
Zeros excluded from the average.
| A | B | |
|---|---|---|
| 1 | Score | Avg (no 0) |
| 2 | 80 | 85 |
| 3 | 0 | |
| 4 | 90 |
The formula
The formula:
How it works
How it works:
AVERAGEIF(range, "<>0")averages only cells that are not equal to zero.- Plain
AVERAGEignores blanks already, but counts a typed 0 — which lowers the result. - Use this when zeros mean “no data” rather than a real measurement.
- To also exclude blanks explicitly or add a second test, switch to
AVERAGEIFS.
Zero vs blank matters. If a survey leaves un-answered cells empty, AVERAGE already skips them. But if missing answers were entered as 0, they count — and AVERAGEIF(range,"<>0") is the fix. Decide whether a zero is real data first.
Try it: interactive demo
Values (commas).
Variations
Exclude zeros & blanks
AVERAGEIFS:
Above a threshold
Only big values:
Ignore negatives too
Positives only:
Pitfalls & errors
Blanks already skip. AVERAGE never counts empty cells — only typed zeros are the problem.
All zeros → #DIV/0!. If nothing passes the criterion, there’s nothing to average.
Quote the operator. The criterion must be the text "<>0", in quotes.
Practice workbook
Frequently asked questions
How do I average a range but ignore zeros in Excel?
Does AVERAGE count blank cells?
What if all values are zero?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class