Quick, clean, and to the point

Average numbers ignore zero

Excel formula: Average numbers ignore zero
Generic formula 

To get the average of a set of numbers, excluding or ignoring zero values, use the AVERAGEIF function. In the example shown, the formula in E6 is:


In the example shown, the formula in E5 is based on the AVERAGE function:

=AVERAGE(B5:D5) // returns 60

The result is 60, since (90+90+0)/ 3 = 60.

To filter out the zero from the calculated average, the formula in E6 uses the AVERAGEIF function like this:

=AVERAGEIF(B6:D6,"<>0") // returns 90

The criteria supplied is "<>0", which means "not equal to zero".

Blank data values

The AVERAGE, AVERAGEIF, and AVERAGEIFS function all automatically ignore blank cells (and cells that contain text values), so there is no need to provide criteria to filter out empty cells.

Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.