Averaging when cells contain blanks or zeros?

liliantsingli

New Member
Joined
Jan 19, 2005
Messages
1
I am trying to average around 50 cells, some of which are either blank or contain zeros. I just want to know the average for the cells that contain numbers. Naturally, If I use =AVERAGE(FI5:HH5) I get the div/0 error. Please can you help me, I have checked the archives to no avail. Thanks in advance.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Welcome!

As you get DIV/0! I guess your numbers are formatted as text.


Try:

=AVERAGE(IF(--FI5:HH5<>0,--FI5:HH5))

Confirmed with Ctrl + Shift + enter.
 
Upvote 0
One way you could work around this is to firstly use COUNTIF
to identify cells with contents >0

e.g.using Column "F" Rows 4 to 34 inclusive

In cell F35
=COUNTIF(F4:F34,">=0")

In cell F36
then sum
=SUM(F4:F34)

Then in cell F37
=SUM(F36/F35)

HTH
Bernard
 
Upvote 0

Forum statistics

Threads
1,215,660
Messages
6,126,088
Members
449,287
Latest member
lulu840

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top