ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Average of a row of numbers not counting 0's (https://www.excelbanter.com/excel-worksheet-functions/100178-average-row-numbers-not-counting-0s.html)

BobS9895

Average of a row of numbers not counting 0's
 
I have a range of numbers, A10:L10, which represents headcounts during
the month. These numbers are a formula, not a manual input. If the
month has not occurred yet, the number equals 0. I want to add a
formula telling me my average headcount per month. However, because
the 0's are included, my average is always understated. Is there a way
to calculate the average while ignoring the 0's? I know I can do it by
deleting the 0's, but since it is a formula, I prefer not doing that.


CLR

Average of a row of numbers not counting 0's
 
=IF(SUM(A10:L10)0,SUMIF(A10:L10,"0")/COUNTIF(A10:L10,"0"),"")

Vaya con Dios,
Chuck, CABGx3




"BobS9895" wrote:

I have a range of numbers, A10:L10, which represents headcounts during
the month. These numbers are a formula, not a manual input. If the
month has not occurred yet, the number equals 0. I want to add a
formula telling me my average headcount per month. However, because
the 0's are included, my average is always understated. Is there a way
to calculate the average while ignoring the 0's? I know I can do it by
deleting the 0's, but since it is a formula, I prefer not doing that.



Dave

Average of a row of numbers not counting 0's
 
BobS9895

Try this

=(SUM(A10:L10)/COUNTIF(A10:L10,"<0"))

Dave
"BobS9895" wrote in message
ups.com...
I have a range of numbers, A10:L10, which represents headcounts during
the month. These numbers are a formula, not a manual input. If the
month has not occurred yet, the number equals 0. I want to add a
formula telling me my average headcount per month. However, because
the 0's are included, my average is always understated. Is there a way
to calculate the average while ignoring the 0's? I know I can do it by
deleting the 0's, but since it is a formula, I prefer not doing that.




BobS9895

Average of a row of numbers not counting 0's
 
Thanks to both of you!





Dave wrote:
BobS9895

Try this

=(SUM(A10:L10)/COUNTIF(A10:L10,"<0"))

Dave
"BobS9895" wrote in message
ups.com...
I have a range of numbers, A10:L10, which represents headcounts during
the month. These numbers are a formula, not a manual input. If the
month has not occurred yet, the number equals 0. I want to add a
formula telling me my average headcount per month. However, because
the 0's are included, my average is always understated. Is there a way
to calculate the average while ignoring the 0's? I know I can do it by
deleting the 0's, but since it is a formula, I prefer not doing that.




All times are GMT +1. The time now is 03:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com