View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Carol Mac[_2_] Carol Mac[_2_] is offline
external usenet poster
 
Posts: 5
Default Change divisor if column is 0

Thanks to all that replied - none of them worked but I appreciate everyone's
input.

"Ron Coderre" wrote:

Try this:

=IF(COUNTIF(A1:C1,"0"),SUM(A1:C1)/COUNTIF(A1:C1,"0"),0)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Carol Mac" wrote:

D1=(A1+B1+C1)/3
If A1, B1 or C1 have a 0 value, can the divisor change automatically so that
it only divides by the number of columns with a value? Thanks.