Archive of Mr Excel Message Board

Back to Forms in Excel VBA archive index
Back to archive home

#DIV/0 error message
Posted by D.Bjorkquist on March 12, 2000 4:17 PM
How do I get rid of that annoying #div/0 error message? 0;-0;;@ is not working.

| Check out our Excel Resources
|
 |
 |
Re: #DIV/0 error message
Posted by Celia on March 12, 2000 4:32 PM
D.Bjorkquist
Use the ISERROR worksheet function in your formula.
For example :-
If the present formula is =A1/B1
Change to =IF(ISERROR(A1/B1),””,A1/B1)
Suggest that you look up the Is Error Worksheet Function in the Help file.
Celia

Re: #DIV/0 error message
Posted by JAF on March 13, 2000 4:01 AM
Another possibility is this (slightly shorter!) formula:
=IF(B1=0,0,A1/B1)
NB - This works when B1 has a value of zero or if it is blank.
I use this at work to calculate Loan to Value ratios, but thanks to Celia for the ISERROR option - I didn't know about that and can certainly see some uses for it.

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.