Formula counting average, eliminating the 0's

alainess

New Member
Joined
Apr 8, 2011
Messages
13
I haven't used this formula in a while and forgot how to. Can you please remind on how to include the formula to count the average, however elimninate the cells that are at 0? Was it something like this:
=average(if>0, M6:P6) ?

Please let me know. Thanks.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Welcome to the Forum,

Try something like this

=AVERAGEIF(M6:P6,">0",M6:P6)
 
Upvote 0
You were almost there.

=AVERAGE(IF(M6:P6>0,M6:P6))
(confirmed with ctrl+shift+enter)
 
Upvote 0
Hi, I tried the formulas that you both provided and there is still an error. they didn't work. I think there is one small error somewhere in yours Neil? Not sure what it is.
 
Upvote 0
Hi, I tried the formulas that you both provided and there is still an error. they didn't work. I think there is one small error somewhere in yours Neil? Not sure what it is.

Nope, it works.

Did you confirm with ctrl+Shift+Enter?
 
Upvote 0
Hi, I tried the formulas that you both provided and there is still an error. they didn't work. I think there is one small error somewhere in yours Neil? Not sure what it is.


Are all your entries numbers?

Excel Workbook
MNOPQ
6120979.333333
Sheet1
 
Upvote 0
Hi, I tried the formulas that you both provided and there is still an error. they didn't work. I think there is one small error somewhere in yours Neil? Not sure what it is.
What version of Excel are you using?

The AVERAGEIF function requires that you are using Excel 2007 or later.

The AVERAGE(IF array formula will work in any version of Excel.
 
Upvote 0
I haven't used this formula in a while and forgot how to. Can you please remind on how to include the formula to count the average, however elimninate the cells that are at 0? Was it something like this:
=average(if>0, M6:P6) ?

Please let me know. Thanks.

Excel 2007 or later...

=AVERAGEIF(M6:P6,">0",M6:P6)

Otherwise, all versions:

=AVERAGE(IF(ISNUMBER(M6:P6),IF(M6:P6>0,M6:P6)))

which requires control+shift+enter, not just enter.

=SUMIF(M6:P6,">0",M6:P6)/COUNTIF(P6:M6,">0")
 
Upvote 0
Yes, my entries are all numbers, however numbers that are transfered over into the cells from other pages. I don't think that should make a difference?
Also, when I hit trhe CTRL, shift, enter, the message simply states that my formula is incorrect and to click on help or function assistant.
Unfortunately, my Excel is in French on my work laptop, however I simply replace the English wording with the correct French wording. It might even accept the English wording. Not sure?
 
Upvote 0
Yes, my entries are all numbers, however numbers that are transfered over into the cells from other pages. I don't think that should make a difference?
Also, when I hit trhe CTRL, shift, enter, the message simply states that my formula is incorrect and to click on help or function assistant.
Unfortunately, my Excel is in French on my work laptop, however I simply replace the English wording with the correct French wording. It might even accept the English wording. Not sure?

Control+shift+enter, not just enter:

=MOYENNE(SI(ESTNUM(M6:P6);SI(M6:P6>0;M6:P6)))

Just enter:

=SOMME.SI(M6:P6;">0";M6:P6)/NB.SI(P6:M6;">0")

On newer Excel versions, probably:

=MOYENNE.SI(M6:P6;">0";M6:P6)
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,463
Members
452,915
Latest member
hannnahheileen

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