Link to home
Start Free TrialLog in
Avatar of Matt Pinkston
Matt Pinkston

asked on

Getting rid of the dreaded #DIV/0!

When I put in a formula with a division I get #DIV/0! anytime there is a zero or null value, how can this me returned as just blank?

Sample

=SUM(J12/J13)
Avatar of MINDSUPERB
MINDSUPERB
Flag of Kuwait image

You may try to use an IF function like:

=IF(J13=0,0,J12/J13)

Sincerely,

Ed
Avatar of Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Hello,

test the values of the cells first, especially the J13 cell. Also, you don't need to wrap a division into a Sum() function.

=if(J13>0,J12/J13,"")

This formula will only undertake the division if the value in cell J13 is greater than Zero. If it is not greater than zero, it will just return an empty text value.

cheers, teylyn
ASKER CERTIFIED SOLUTION
Avatar of Steve
Steve
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
use your formula with IFERROR like this:
=IFERROR(SUM(J12/J13);"")

see in my sample
sample.xlsx