Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default IF Statement with text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF Statement with text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default IF Statement with text

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF Statement with text

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?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF Statement with text

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 -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default IF Statement with text

=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
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
If Statement for Text Kehau37 Excel Discussion (Misc queries) 4 October 24th 07 03:41 PM
using IF statement to compare text RichN Excel Worksheet Functions 4 November 1st 06 09:48 PM
If then statement to search for text possible? Ken Wright Excel Discussion (Misc queries) 6 January 31st 06 09:52 PM
if statement with text jerry Excel Discussion (Misc queries) 2 June 24th 05 01:21 AM
If statement for text decanno04 Excel Worksheet Functions 2 June 17th 05 12:41 AM


All times are GMT +1. The time now is 12:47 AM.

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"