Average with 0s and without 0s

timspin

Board Regular
Joined
Nov 18, 2002
Messages
231
Hi All,

I have a column of numbers, including cells that contain a “0,” and I want to AVERAGE the column both ways—including the zeros and then ignoring the zeros. How can I write a formula that will average the column but ignore the zeros? [Excel already ignores BLANK cells when doing averages, but I don’t want the cells to be blank, I want to show the viewer that there is a zero in it.]

Any help gratefuly recieved
Thanks
Tim
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
You could do

=SUM(A1:A10)/COUNTIF(A1:A10,">0")

Assuming there are no negative numbers...
 
Upvote 0
Try

=AVERAGE(IF(A1:A4<>0,A1:A4))

Confirmed with CTRL + Shift + Enter, not just enter.
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

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