Dividing zero by zero

  • Thread starter Thread starter Sanjeev Raghavan
  • Start date Start date
S

Sanjeev Raghavan

In my work sheet 2 column with numbers and in some columns both numbers are
zeros. Is there any forlume I can use in order to get zero as result not
#DIV/0!
Please advice.
Sanjeev
 
By far the simplest way is to check if the cell contains zero

=IF(B1=0,"",A1/B1)

Mike
 
Mike, I'm having a similar problem, I have two columns of numbers where
either or both arguments can be zero. I want to turn this into a percentage,
returning 0 if appropriate.

How do you add to the formula you've recommended to cover both arguments -
e.g. if I want to calculate A5/A10 and A5 and A10 are both zero? Using the
answer you gave is fine for the first column but I've been unable to amend it
to cover the second column?
 
Hi TJE

It doesn't mater if the Dividend is 0, you only need to check the
Divisor to ensure you don't get a Divide by zero error.

If you want a 0 as the result then amend the formula to
=IF(A10=0,0,A5/A10)
 
Back
Top