if is error and #DIV/O!

W

Wanna Learn

Hello this is my original formula =(A1-B1)/A1. This is Ok except that
sometimes I get #DIV/0!. so I tried to fix the formula to this
=IF(ISERROR(A1-B1)/A1,"",(A1-B1)/A1).. What I'm I missing? thanks in
advance
 
S

Sandy Mann

You are missing a set of parenthesis

=IF(ISERROR((A1-B1)/A1),"",(A1-B1)/A1)




--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
D

David Biddulph

Firstly the parameter which you have supplied to ISERROR is (A1-B1), but I
guess that you aren't getting an error on the subtraction.
The error you are looking for is in the division, so the parameter for
ISERROR should be ((A1-B1)/A1), so the formula then becomes:
=IF(ISERROR((A1-B1)/A1),"",(A1-B1)/A1)

Secondly, with the use of ISERROR you might hide other errors which you
ought to investigate separately, so you would be better just trapping for
the specific #DIV/0! error, so why not use:
=IF(A1=0,"",(A1-B1)/A1)
 

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

#DIV/0! 8
Sum not adding cells. 3
IF iserror does not work 8
Why is this code not working ? 3
IF Formula 2
Percentage with a zero involved 8
A1 and B1 6
Excel Need Countifs Formula Help 0

Top