Average numbers ignore zero

Generic formula
=AVERAGEIF(range,"<>0")
Summary
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:
=AVERAGEIF(B6:D6,"<>0")
Explanation
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.
Download 100+ Important Excel Functions
Get over 100 Excel Functions you should know in one handy PDF.