Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

M/S Excel, cover up errors

Status
Not open for further replies.

tomh

Programmer
Aug 3, 2001
1
US
The message #div/o! is coming up on my spreadsheet as to be expected as i am dividing by 0 this is because enitially there is no data in the sheet however is there a way to cover it up or stop it from happening
cheers
 
You can use an IF statement for your expression:
Code:
=IF(B1<>0,A1/B1,&quot;&quot;)
 
Either of these formulas should mask the error message when you have a blank or a zero in the cell:

=IF(OR(ISBLANK(b1),b1=0),&quot;&quot;,a1/b1)

=IF(OR(b1=0,b1=&quot;&quot;),&quot;&quot;,a1/b1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top