Home |
Search |
Today's Posts |
#1
|
|||
|
|||
#DIV/0!
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 |
#2
|
|||
|
|||
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. "Brandt" wrote: 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 |
#3
|
|||
|
|||
Hi
=IF(A2=0,"",A1/A2) -- Regards Frank Kabel Frankfurt, Germany Brandt wrote: 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 |
#4
|
|||
|
|||
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 "Frank Kabel" wrote: Hi =IF(A2=0,"",A1/A2) -- Regards Frank Kabel Frankfurt, Germany Brandt wrote: 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 |
#5
|
|||
|
|||
Try validation see
http://www.contextures.com "Brandt" wrote in message news:1A494A31-10FA-4867-91AC-25EDC3239C9B -- --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Brandt" wrote in message ... 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 |
#6
|
|||
|
|||
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) "Brandt" wrote in message ... 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. "Brandt" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trap #Div/0 in conditional formatting | Excel Discussion (Misc queries) | |||
#DIV/0! ...how to suppress when using this formula.... | Excel Discussion (Misc queries) | |||
DIV/0 vs 0.00 | Excel Discussion (Misc queries) |