Formula Error

C

Cheri

When creating formulas, is there a way to avoid the #DIV/0! Error without
having to insert IF(C5<0,0) into each formula?
 
G

Gord Dibben

Cheri

In order to prevent the #DIV/0! you must trap the 0(or blank) somehow.

=IF(C5=0,"",B5/C5)

=IF(ISERROR(B5/C5),"",B5/C5)

Watch out when using ISERROR.......it will mask all errors, not just #DIV/0!

Gord Dibben Excel MVP
 
D

Dave Peterson

I would rather change the formula to check for possible errors first, but you
could use Format|conditional formatting.

And make the text color match the fill color (white on white). The error is
still there, but it looks ok.

=iserror(a1)

would be the formula I'd use for the Conditional formatting formula for A1.

===
I don't like to have hidden stuff like this. It sometimes makes it difficult to
see why the next formula returns an error. But it may be useful in this case.
 
Top