View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default if is error and #DIV/O!

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)
--
David Biddulph

"Wanna Learn" wrote in message
...
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