how to sum cells and ignore the #div/0! 's ?

B

Bryan

I an working with the following formula: =SUM(C8:E8)/COUNTIF(C8:E8,">0") if I
initially have no data entered i get the #div/0! 's is there a fix for this?
 
M

Mike H

Hi,

=IF(COUNT(C8:E8)>0,SUM(C8:E8)/COUNTIF(C8:E8,">0"),"")
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
T

Teethless mama

=IF(COUNT(C8:E8)>0,SUM(C8:E8)/COUNTIF(C8:E8,">0"),"")

your formula fail if
C8: 0, D8: blank, C8: blank, or all 0s or 0,0, blank

Robust formula:
=IF(COUNTIF(C8:E8,">0"),SUM(C8:E8)/COUNTIF(C8:E8,">0"),"")
 

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

Top