ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Math
  3. How to Average Without Zeros or Blanks in Excel

How to Average Without Zeros or Blanks in Excel

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

To average without zeros in Excel, use =AVERAGEIF(C2:C9,"<>0"). The criteria "<>0" means not equal to zero, so zero cells are left out of both the total and the count. Blank cells are already ignored by AVERAGE and AVERAGEIF. To add another condition, such as a region, use AVERAGEIFS.

Key takeaways

  • =AVERAGEIF(range,"<>0") averages every cell that isn't zero.
  • AVERAGE already skips blank cells and text, but it counts zeros.
  • Use ">0" instead of "<>0" if you also want to leave out negative numbers.
  • AVERAGEIFS adds more conditions: =AVERAGEIFS(C2:C9,B2:B9,"East",C2:C9,"<>0").
  • If every value is zero, the result is #DIV/0!; wrap it in IFERROR.
On this page+
  1. Why zeros pull your average down
  2. How to average without zeros using AVERAGEIF
  3. Does AVERAGE ignore blank cells?
  4. How to ignore zeros and negative numbers
  5. How to average without zeros with another condition
  6. How to handle #DIV/0! when every value is zero
  7. Should missing data be a zero or a blank?
  8. Other ways to average without zeros
  9. Practise it

To average without zeros in Excel, use =AVERAGEIF(C2:C9,"<>0"). A zero that really means "no data yet" drags a normal average down, and AVERAGEIF leaves those cells out. Blank cells are a different story: AVERAGE already skips them. This guide shows both cases on one sales table, how to add a second condition, and how to stop #DIV/0! errors.

Why zeros pull your average down#

AVERAGE adds the numbers and divides by how many there are. A zero adds nothing to the total but still counts as one value, so the average shrinks.

Here is the sales table used in this guide, in A1:C9. Ben and Eve show 0 because their figures haven't come in, and Finn's cell is empty:

ABC
1RepRegionSales
2AnaEast420
3BenWest0
4CaraEast380
5DanWest510
6EveEast0
7FinnWest
8GiaEast460
9HugoWest300

=AVERAGE(C2:C9) returns 295.71. The total is 2,070, and AVERAGE divides it by 7: the five real figures plus the two zeros. Finn's blank cell isn't counted. The real average of the reps who reported is 2,070 / 5 = 414.

How to average without zeros using AVERAGEIF#

Give AVERAGEIF the range and the criteria "<>0", which means "not equal to zero".

Excel formula
=AVERAGEIF(C2:C9,"<>0")

The result is 414. AVERAGEIF checks each cell against the criteria, keeps the ones that pass, and averages only those. The <> operator means "not equal to" in Excel, and it goes inside the double quotes together with the 0.

The full syntax has an optional third argument:

Excel formula
=AVERAGEIF(range, criteria, [average_range])

When you leave out average_range, Excel averages the same cells it checks. The AVERAGEIF guide covers the other criteria you can use, and the AVERAGEIF, MAXIFS and MINIFS lesson lets you practise them.

Does AVERAGE ignore blank cells?#

Yes. AVERAGE, AVERAGEIF and AVERAGEIFS all ignore empty cells and cells that contain text. You don't need a special formula to skip blanks.

Cell holdsCounted by AVERAGE?
A number, including 0Yes
Nothing (empty)No
Text, such as "n/a"No
An empty string "" from a formulaNo

Be careful with cells that only look empty. A cell formatted to hide zeros still holds 0 and still counts. The AVERAGE function guide lists the rules, and the article on AVERAGE, MIN and MAX explains the basics.

How to ignore zeros and negative numbers#

Use ">0" instead of "<>0" when only positive numbers are real data.

Excel formula
=AVERAGEIF(C2:C9,">0")

On this table the result is still 414, because there are no negative values. On data with refunds or corrections, ">0" leaves those out too. Choose based on what your negative numbers mean: if a refund of -50 is real, keep "<>0".

How to average without zeros with another condition#

Use AVERAGEIFS, which takes several pairs of range and criteria. Note that the range to average comes first.

Excel formula
=AVERAGEIFS(C2:C9,B2:B9,"East",C2:C9,"<>0")

This averages the East sales that aren't zero: Ana, Cara and Gia. The result is (420 + 380 + 460) / 3 = 420. Without the zero test, Eve's 0 would pull the East average down to 315.

The AVERAGEIFS function guide explains the argument order. The same "range first" pattern applies to SUMIFS and COUNTIFS.

How to handle #DIV/0! when every value is zero#

If no cell passes the criteria, AVERAGEIF has nothing to divide by and returns #DIV/0!. This can happen at the start of a month, when every figure is still 0.

Excel formula
=IFERROR(AVERAGEIF(C2:C9,"<>0"),"")

IFERROR shows an empty cell instead of the error. You could show a message instead, such as "No data yet". Use IFERROR only around formulas you've tested, because it hides every kind of error, including typing mistakes.

Should missing data be a zero or a blank?#

The cleanest fix is often in the data, not the formula. A zero should mean "the answer is zero": a rep who sold nothing. A blank should mean "we don't know yet". If your sheet follows that rule, a plain AVERAGE gives the right answer, because it skips blanks and keeps real zeros.

Trouble starts when one sheet mixes the two meanings. In the table above, Ben and Eve show 0 only because their figures are late. If Ben really sold nothing this month, leaving him out of the average would make the team look better than it is.

So before you reach for "<>0", ask what each zero means:

  • Real result of zero: keep it. Use AVERAGE.
  • Placeholder for missing data: leave it out with AVERAGEIF, or better, clear the cell so it's blank.
  • A formula that returns 0 when its inputs are empty: change it to return "", for example =IF(B2="","",B2*C2). AVERAGE skips the empty text.

Other ways to average without zeros#

You may see these alternatives in older workbooks:

  • SUM divided by COUNTIF: =SUM(C2:C9)/COUNTIF(C2:C9,">0") returns 414 here. Be careful: COUNTIF(range,"<>0") also counts blank cells, so with Finn's empty cell it would divide by 6 and give 345. Use ">0" for positive data, or just use AVERAGEIF.
  • Median without zeros: in Excel 2021 or Microsoft 365, =MEDIAN(FILTER(C2:C9,C2:C9<>0)) returns the middle non-zero value, 420. The comparison of AVERAGE vs MEDIAN explains when the median is the better summary.

If some values matter more than others, such as prices weighted by quantity, a plain average is the wrong tool; see how to calculate a weighted average. Leaving out empty listings is also a common task in property reports, covered in Excel skills for real estate.

Practise it#

Conditional averages come up in most Excel tests, and the zero trap is a favourite trick question. Practise AVERAGEIF, MAXIFS and MINIFS in a live spreadsheet: you type the formula and it checks it instantly. If you want to warm up first, practise AVERAGE, MIN and MAX on a simpler table.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Two reps show 0 because their figures aren't in yet, and Finn's cell is blank. Click E2 and find the average sales without the zeros, using AVERAGEIF on C2:C9.

fx
ABCDEF
1
Rep
Region
Sales
2
Ana
East
420
3
Ben
West
0
4
Cara
East
380
5
Dan
West
510
6
Eve
East
0
7
Finn
West
8
Gia
East
460
9
Hugo
West
300
10
11
12

Tip: The range is C2:C9 and the criteria is "<>0" in double quotes.

Practise this in a lesson

LessonAVERAGEIF, MAXIFS and MINIFSFind the average, highest and lowest values that meet one or more conditions.LessonAVERAGE, MIN and MAXSummarize a list with its average, smallest and largest values.Function guideAVERAGEIFSAverage only the rows that meet several conditions with AVERAGEIFS. Text, number and blank criteria, common errors, and live practice.Function guideAVERAGECalculate the mean in Excel with AVERAGE. See how it treats blanks and zeros, avoid common errors, and practice in a live sheet.

Frequently asked questions

How do I average a range but ignore zeros in Excel?

+

Use =AVERAGEIF(range,"<>0"), for example =AVERAGEIF(C2:C9,"<>0"). It adds the non-zero values and divides by how many there are.

Does AVERAGE ignore blank cells?

+

Yes. AVERAGE ignores empty cells and cells that contain text, so they don't affect the result. It does count cells that contain 0.

How do I average without zeros and with another condition?

+

Use AVERAGEIFS with the zero test as one of the conditions: =AVERAGEIFS(C2:C9,B2:B9,"East",C2:C9,"<>0") averages the non-zero values for East only.

Why does AVERAGEIF return #DIV/0!?

+

No cells matched the criteria, so Excel has nothing to divide by. This happens when every value is zero or blank. Use =IFERROR(AVERAGEIF(C2:C9,"<>0"),"") to show a blank instead.

How do I find the median without zeros?

+

In Excel 2021 or Microsoft 365, use =MEDIAN(FILTER(C2:C9,C2:C9<>0)). FILTER removes the zeros and MEDIAN finds the middle value of what's left.

Sources

  • AVERAGEIF function - Microsoft Support
  • AVERAGEIFS function - Microsoft Support
  • AVERAGE function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. Why zeros pull your average down
  2. How to average without zeros using AVERAGEIF
  3. Does AVERAGE ignore blank cells?
  4. How to ignore zeros and negative numbers
  5. How to average without zeros with another condition
  6. How to handle #DIV/0! when every value is zero
  7. Should missing data be a zero or a blank?
  8. Other ways to average without zeros
  9. Practise it

Keep reading

Math· 5 min read

AVERAGE, MIN and MAX in Excel With Examples

AVERAGE returns the mean of a range, MIN returns the smallest number and MAX returns the largest. All three take the same input: =AVERAGE(B2:B6), =MIN(B2:B6) and =MAX(B2:B6). They skip empty cells and text but count zeros, and =MAX(B2:B6)-MIN(B2:B6) shows how spread out the values are.

Math· 6 min read

How to Calculate a Weighted Average in Excel

To calculate a weighted average in Excel, multiply each value by its weight, add the results, and divide by the total of the weights: =SUMPRODUCT(B2:B5,C2:C5)/SUM(C2:C5). B2:B5 holds the values and C2:C5 the weights. Dividing by SUM keeps the answer right even when the weights don't add up to 100%.

Comparisons· 7 min read

AVERAGE vs MEDIAN: Which Tells the Truth?

Use MEDIAN to describe a typical value when a few very large or very small numbers could skew the result, such as salaries, house prices or order values. Use AVERAGE when the values are fairly even, or when you need a number that multiplies back to the total, as in budgets. When the two differ a lot, report both.

More on math

  • CAGR Formula in Excel: Compound Annual Growth Rate
  • How to Calculate Discounts and Sale Prices in Excel
  • Compound Interest Formula in Excel, Step by Step
  • COUNT, COUNTA and COUNTBLANK: Counting Cells in Excel
  • FV Function in Excel: Future Value of Savings
  • How to Increase or Decrease a Number by a Percentage
All math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free