#1   Report Post  
Brandt
 
Posts: n/a
Default #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   Report Post  
Brandt
 
Posts: n/a
Default

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   Report Post  
Frank Kabel
 
Posts: n/a
Default

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   Report Post  
Brandt
 
Posts: n/a
Default

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   Report Post  
David McRitchie
 
Posts: n/a
Default

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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trap #Div/0 in conditional formatting Neil Excel Discussion (Misc queries) 2 December 16th 04 10:19 AM
#DIV/0! ...how to suppress when using this formula.... Randy Lefferts Excel Discussion (Misc queries) 7 December 2nd 04 09:56 PM
DIV/0 vs 0.00 IC Excel Discussion (Misc queries) 0 November 26th 04 04:14 PM


All times are GMT +1. The time now is 11:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"