Archive of Mr Excel Message Board
Back to Forms in Excel VBA archive index
Back to archive home
if and - if or statementsPosted by wheatear1 on February 27, 2001 10:38 AM
If I want to set up an if statement that returns the following, how di I do it?
if x is between 0 and 70 AND x is between 310-360,
then convert it to .1
Thanks in advance!
|Check out our Excel Resources
Huh?Posted by Mark W. on February 27, 2001 10:54 AM
x can never be between both of these ranges.
Re: Huh? AND what is to be modified: x or something else? *NT*Posted by Aladin Akyurek on February 27, 2001 11:03 AM
Re: if and - if or statementsPosted by David Hawley on February 27, 2001 8:46 PM
I'm guessing meant X and Y if so this formula below will do it.
Where A1 is the X and B1 is the Y.
OzGrid Business Applications
Re: if and - if or statementsPosted by Aladin Akyurek on February 27, 2001 11:53 PM
Also why not:
where x in A1.
It would be nice if wheatear1 would like to reformulate the question.
Re: if and - if or statementsPosted by Carl B on February 28, 2001 12:00 AM
As stated elsewhere, x can not be both, therefore I will assume that it should be between 0 and 70 OR betweeb 310 and 360, if so use a Select Case statement.
Select Case x
Case 0 to 70, 310 to 360
x = .1
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.