Dividing zero by zero

  • Thread starter Sanjeev Raghavan
  • 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
 
M

Mike H

By far the simplest way is to check if the cell contains zero

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

Mike
 
T

TJE

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?
 
R

Roger Govier

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)
 

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