IF Statement with text

G

Guest

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?
 
P

Pete_UK

Try this instead:

=IF(OR(RIGHT($I5,2)="A1",RIGHT($I5,2)="A2"),"Y","")

Hope this helps.

Pete
 
G

Guest

=IF(OR(RIGHT(A1,2)="A1",RIGHT(A1,2)="A2"),"Y","")

Above you will find the answer to your question.

Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top