#DIV/0!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to specify in an IF statement to do something if the
conditional statement returns a div/0 error.

For example: =IF(A1/A2=#DIV/0!,"You Must Enter a Positive Value",A1/A2)

Thanks for any help
 
Oops,

I just read the post on the "trailing space / format question" that was
pretty dumb of me not to think of the ISERROR function.
 
Thanks Frank,

I guess I somewhat oversimplified my question. I was actually calculating
the std deviation of entries, and just wanted to clean up the DIV/0! error
reading when only 1 or no entries were made. The question did seem pretty
dumb when I saw your reply. Sorry - Just didn't want to be to longwinded.

Thanks again

Brandt
 
Brandt,

ISERROR is needed there because that is the way to find the errors. In your
case, you can simplify it because it can only be caused by a zero divisor.
So you can test

=IF(A2=0,"You Must Enter a Positive Value",A1/A2)


--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top