Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to create an if statment where if the last two characters in a
cell are A1 or A2, "Y" appears in another cell. I've tried a couple of formulas and nothing seems to be working. =IF(OR($I5="*A1",$I5="*A2"),"Y"," ") =IF($I5="*A1", IF($I5="*A2), "Y", " ") Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this instead:
=IF(OR(RIGHT($I5,2)="A1",RIGHT($I5,2)="A2"),"Y","" ) Hope this helps. Pete On Nov 19, 9:10 pm, JustinD wrote: I am trying to create an if statment where if the last two characters in a cell are A1 or A2, "Y" appears in another cell. I've tried a couple of formulas and nothing seems to be working. =IF(OR($I5="*A1",$I5="*A2"),"Y"," ") =IF($I5="*A1", IF($I5="*A2), "Y", " ") Any suggestions? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks! Worked perfectly.
"Pete_UK" wrote: Try this instead: =IF(OR(RIGHT($I5,2)="A1",RIGHT($I5,2)="A2"),"Y","" ) Hope this helps. Pete On Nov 19, 9:10 pm, JustinD wrote: I am trying to create an if statment where if the last two characters in a cell are A1 or A2, "Y" appears in another cell. I've tried a couple of formulas and nothing seems to be working. =IF(OR($I5="*A1",$I5="*A2"),"Y"," ") =IF($I5="*A1", IF($I5="*A2), "Y", " ") Any suggestions? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You're welcome - thanks for feeding back.
Pete On Nov 19, 9:31 pm, JustinD wrote: Thanks! Worked perfectly. "Pete_UK" wrote: Try this instead: =IF(OR(RIGHT($I5,2)="A1",RIGHT($I5,2)="A2"),"Y","" ) Hope this helps. Pete On Nov 19, 9:10 pm, JustinD wrote: I am trying to create an if statment where if the last two characters in a cell are A1 or A2, "Y" appears in another cell. I've tried a couple of formulas and nothing seems to be working. =IF(OR($I5="*A1",$I5="*A2"),"Y"," ") =IF($I5="*A1", IF($I5="*A2), "Y", " ") Any suggestions?- Hide quoted text - - Show quoted text - |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One way:
=IF(OR(RIGHT($I5,2)={"A1","A2"}),"Y","") -- Biff Microsoft Excel MVP "JustinD" wrote in message ... I am trying to create an if statment where if the last two characters in a cell are A1 or A2, "Y" appears in another cell. I've tried a couple of formulas and nothing seems to be working. =IF(OR($I5="*A1",$I5="*A2"),"Y"," ") =IF($I5="*A1", IF($I5="*A2), "Y", " ") Any suggestions? |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=IF(OR(RIGHT(A1,2)="A1",RIGHT(A1,2)="A2"),"Y","")
Above you will find the answer to your question. Regards, "JustinD" wrote: I am trying to create an if statment where if the last two characters in a cell are A1 or A2, "Y" appears in another cell. I've tried a couple of formulas and nothing seems to be working. =IF(OR($I5="*A1",$I5="*A2"),"Y"," ") =IF($I5="*A1", IF($I5="*A2), "Y", " ") Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If Statement for Text | Excel Discussion (Misc queries) | |||
using IF statement to compare text | Excel Worksheet Functions | |||
If then statement to search for text possible? | Excel Discussion (Misc queries) | |||
if statement with text | Excel Discussion (Misc queries) | |||
If statement for text | Excel Worksheet Functions |