divide by zero error

G

Graham Bennet

Hello All,

Does anyone know how to stop the divide by zero error appearing in a cell.

Thanks, Graham
 
A

Alan

If A1=0, A2=20 for example,
=A2/A1 will give #DIV/0
=IF(A1<>0,A2/A1,0)
will give Zero if A1 is Zero, if not the result of the calculation, or
=IF(A1<>0,A2/A1,"Your Error Message")
will generate any message you want,
in other words, use the IF function to establish if the divisor is Zero or
not, if it is, Error message of your choice, if not, perform the
calculation,
Regards,
 
Top