Good afternoon!! I have the following formula on a spreadsheet I am working on

=IF(ISBLANK(B10),"",IF(B10>=0,E10/D10,0))

Unfortunately, when the result is 0 Excel displays a #DIV/0 error. I am aware of the use of the IFERROR formula however, in the above formula I do not exactly where I would place the IFERROR function name?

Plesae help.

Thank you all!

re: " Unfortunately, when the result is 0 Excel displays a #DIV/0 error."I don't think that's true.

The formula itself can return a 0. In fact, if B10 contains a negative number, the formula will return 0 because you told it to.

IF(

B10>=0,E10/D10,0)However, if D10 = 0 that's when you'll get a #DIV/0 because you are trying to divide E10 by 0. Excel doesn't like that.

If you want to prevent the #DIV/0 error, then check D10 for a value other than 0. Assuming you want an empty cell when D10 = 0, try this:

=IF(OR(ISBLANK(B10),D10=0),"",IF(B10>=0,E10/D10,0))

If you want something else, something like this should work:

=IF(ISBLANK(B10),"",IF(D10=0,"D10 is Zero!",IF(B10>=0,E10/D10,0)))

If you really want to use IFERROR, the following formula will work, but of course it will hide

anyerror that the formula produces, not just the one you are specifically trying to hide.=IFERROR(IF(ISBLANK(B10),"",IF(B10>=0,E10/D10,0)),"")

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03

Ask Your Question

Weekly Poll

Would you ride in a self-driving car from Tesla?

Discuss in The Lounge

Poll History