Dividing by Zero

  • Thread starter Thread starter TomRW
  • Start date Start date
T

TomRW

If I have 8 in A1 and 2 in A2 I get 25%.

But if I have 8 in A1 and 0 in A2 I get #DIV/0!. When I want to get 0
or 0%.

Simple remedy?
 
I'm intrigued as to what formula you are using that gives those results? If
you've got 8 in A1 and 2 in A2, then the most obvious formula to give 25%
would be =A2/A1, but if that is the formula you wouldn't get a #DIV/0! when
A2 is 0. If you are trying to protect against A1 (rather than A2) being
zero, then you could use =IF(A1=0,0,A2/A1), but be careful if you use that
formula, as you wouldn't see the difference in result between A1 being zero
and A2 being zero. As you reduce the value of A1, the result of the
division increases, but you have asked for it to reduce again when you get
to A1 being zero; the result of the division should be infinite, not zero,
so make sure that you don't confuse yourself.
 

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

Similar Threads

ZERO VALUES 4
How do I make this work? 15
dividing 0 by 0 in excel 2003 10
Percentage with a zero involved 8
Average time 1
Average Formula 1
Excel Need Countifs Formula Help 0
Displaying zeros in cells 2

Back
Top