A wee bit of difficulty with Count Function

Saffire

New Member
Joined
Mar 12, 2012
Messages
14
Hey everyone,

This is going to probably be one of those "D'OH!" questions but here I go.

I have a range (C2:C32) that has some zero values. I need to average the range WITHOUT the zeros. I believe that a counting function would work, but of course I am having one of those blonde moments that I am notorious for.

Here is the formula that I was originally trying:
=COUNT(C2:C32>0)AVERAGE(C2:C32)

Of course, my excel sheet called me some very bad names when I entered that!
 
Okay, ran into another SNAFU on this subject. Everything works perfectly for me in Excel 2007, however Bossman refuses to let go of his Excel 2003 stating that he has "just now gotten use to it"! I need to revise this formula to work in 2003 without getting back a #DIV/0 result. Any ideas?

I have been using the array:

{=AVERAGE(IF(J2:J32<>0,J2:J32,"0"))}
Will the numbers always be positive numbers?
 
Upvote 0

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Yes, however there will also be some times where there is not data (thus the 0s) but I want to have the same formula across the board so that when data is added in the future it will automatically update that calculation.
 
Upvote 0
Yes, however there will also be some times where there is not data (thus the 0s) but I want to have the same formula across the board so that when data is added in the future it will automatically update that calculation.
Try this...

=SUM(J2:J32)/MAX(1,COUNTIF(J2:J32,">0"))
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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