View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default Division by Zero Error

You could put the entire average calculation inside an if that detects a 0
denominator and avoids the division in such cases:
=if(countif(F49:j49,"0")=0, 0, your average calculation)

"Ken D." wrote:

I am using this formula to average the values in cells F49:J49 if the value
is greater than zero.

=SUMIF(F49:J49,"0")/COUNTIF(F49:J49,"0")

When all values are 0, I'm getting the division by zero error.

Just a little help please...