Average without counting zeros

Vintage79

Board Regular
Joined
May 29, 2007
Messages
187
Office Version
  1. 2019
Platform
  1. Windows
Hello all,

I know this is terribly basic, but I wasn't able to find the answer in the Excel Help file, or by searching the forum.

I have a list of numbers in G6:G10000 and would like to find the average value, without counting any zero values. I thought it would be something like:

=AVERAGEIF(G6:G10000>0)

But this didn't work! :)
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hello all,

I know this is terribly basic, but I wasn't able to find the answer in the Excel Help file, or by searching the forum.

I have a list of numbers in G6:G10000 and would like to find the average value, without counting any zero values. I thought it would be something like:

=AVERAGEIF(G6:G10000>0)

But this didn't work! :)
Pretty close!

Try it like this...

=AVERAGEIF(G6:G10000,">0")
 
Upvote 0
Try

=AVERAGE(IF(G6:G10000<>0,G6:G10000))

confirmed with CTRL + Shift + Enter.
 
Upvote 0
Thanks a lot for the fast responses!

The first two didn't work for me - they returned #NAME? I have no idea why, but I am using Office 2000, maybe I should have mentioned that.

VoG's one works perfectly - thanks!

UPDATE: Hotpepper, yours returns #NAME? too! I'm sure you three cannot all be wrong, so I wonder why those don't work for me?
 
Upvote 0
The AVERAGEIF function is only available in XL2007 or higher.
 
Upvote 0
Vintage79 said:
I am using Office 2000
Ok, then try this array entered version which will work in all versions of Excel.

=AVERAGE(IF(G6:G10000>0,G6:G10000))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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