PDA

View Full Version : How to Show Blank Cell Instead Of #DIV/0!



Mattster2020
06-24-2009, 02:57 AM
Morning All,

I am using a simple divide forumla (E5/F5) in cell (H5) to return an average. Is there anyway that if the contents of E5 and F5 are zero that a blank cell or zero can be returned instead of DIV/0!.

Regards,

Matt

p45cal
06-24-2009, 03:13 AM
=IF(ISERROR(E5/F5),"",E5/F5)
or to give you exactly waht you asked for:
=IF(OR(E5=0,F5=0),"",E5/F5)
Note that only a zero/blank in F5 will give a #DIV/0 error, a 0 in E5 will not.

Aussiebear
06-24-2009, 03:20 AM
Use =IF(Error.Type(E5/F5)=2,"",E5/F5)

Note the use of the Error.Type function within the formula. By using this, you are checking for errors causing the Divide by Zero, rather than just masking all errors when using ISError.