Average of a row of numbers not counting 0's

  • Thread starter Thread starter BobS9895
  • Start date Start date
B

BobS9895

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.
 
=IF(SUM(A10:L10)>0,SUMIF(A10:L10,">0")/COUNTIF(A10:L10,">0"),"")

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top