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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,225,156
Messages
6,183,242
Members
453,152
Latest member
ChrisMd

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