Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with IF statement
Can you have multiple tests, in the test section of the if statement? For
example. If (A2=1or2or5or25,True,False) |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with IF statement
"Sean.rogers" wrote:
Can you have multiple tests, in the test section of the if statement? For example. If (A2=1or2or5or25,True,False) Try it like this: =IF(OR(A1={1,2,5,25}),"Y","N") -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with IF statement
Hi Sean,
You can do it like this, =IF(OR(A2=1,A2=2,A2=5,A2=25),TRUE,FALSE) or you can be simplify it like this, =IF(OR(A2={1,2,5,25}),TRUE,FALSE) HTH Martin "Sean.rogers" wrote in message ... Can you have multiple tests, in the test section of the if statement? For example. If (A2=1or2or5or25,True,False) |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with IF statement
Thank you worked like a charm.
"Max" wrote: "Sean.rogers" wrote: Can you have multiple tests, in the test section of the if statement? For example. If (A2=1or2or5or25,True,False) Try it like this: =IF(OR(A1={1,2,5,25}),"Y","N") -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with IF statement
You could simplify that further:
=OR(A2=1,A2=2,A2=5,A2=25) or just: =OR(A2={1,2,5,25}) Hope this helps. Pete On Apr 23, 1:24*pm, "MartinW" wrote: Hi Sean, You can do it like this, =IF(OR(A2=1,A2=2,A2=5,A2=25),TRUE,FALSE) or you can be simplify it like this, =IF(OR(A2={1,2,5,25}),TRUE,FALSE) HTH Martin "Sean.rogers" wrote in message ... Can you have multiple tests, in the test section of the if statement? For example. If (A2=1or2or5or25,True,False)- Hide quoted text - - Show quoted text - |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with IF statement
Can I include an arrey that referances another sheet?
"Max" wrote: "Sean.rogers" wrote: Can you have multiple tests, in the test section of the if statement? For example. If (A2=1or2or5or25,True,False) Try it like this: =IF(OR(A1={1,2,5,25}),"Y","N") -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with IF statement
Yep, I always think in terms of IF and forget the fact
that sometimes it is irrelevant. I don't think I'll ever manage to expel that habit. <bg Regards Martin "Pete_UK" wrote in message ... You could simplify that further: =OR(A2=1,A2=2,A2=5,A2=25) or just: =OR(A2={1,2,5,25}) Hope this helps. Pete On Apr 23, 1:24 pm, "MartinW" wrote: Hi Sean, You can do it like this, =IF(OR(A2=1,A2=2,A2=5,A2=25),TRUE,FALSE) or you can be simplify it like this, =IF(OR(A2={1,2,5,25}),TRUE,FALSE) HTH Martin "Sean.rogers" wrote in message ... Can you have multiple tests, in the test section of the if statement? For example. If (A2=1or2or5or25,True,False)- Hide quoted text - - Show quoted text - |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help with IF statement
Can I include an arrey that referances another sheet?
Do you mean something like this, which needs to be array-entered ie press CTRL+SHIFT+ENTER to confirm the formula: =IF(OR(A1=MyR),"Y","N") where MyR refers to a col range on another sheet containing the values: 1,2,5,25 -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can an If statement answer an If statement? | Excel Discussion (Misc queries) | |||
IF AND statement | Excel Worksheet Functions | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions | |||
If statement and Isblank statement | Excel Worksheet Functions | |||
Help please, IF statement/SUMIF statement | Excel Worksheet Functions |