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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Divide By Zero

Status
Not open for further replies.

estone4009

Technical User
Dec 31, 2001
39
US
I'm wanting to prefill a sheet with the formulas needed so that a user only has to enter two values and print the results. But I can not fill the formula down or I get #DIV/0 errors and they print on the sheet. How can I have these formulas pre filled down but hide the Divide By zero error until data is entered?
 
use an IF statement in the formula to check for ISERROR:

ex.

=IF(ISERROR(A1/A2),"",A1/A2)

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
estone

Cange the formula so that it reads

if(iserror(your formula),0,(your formula))

That way if the formula returns an error the cell will display 0 other wise it displays the correct value.
You can make things look tidier using the Tools-Options and on the View tab unselecting Zero Values.

 
bluedragon's formula would be better, the zero's would skew any kind of averages you might be using on the sheet.

coachdan32
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top