Using wildcards in formulas

  • Thread starter Thread starter KrispyData
  • Start date Start date
K

KrispyData

I want to create a formula that states: if cell in columnA ends in (L) then
show result in ColumnB as Local.

sample data:
ColumnA
1.Wow Widget Store (L)
2.Widgets N More
3.Major Widget Store (L)
4.Allstar Widgets

I tried using the following formula:
if(A1="*(L)","Local","no)
Excel will not accept that. Any suggestions?
 
If it ends in (L), then:
=IF(RIGHT(A1,3)="(L)","Local","No")

if you really wanted a wild card, you could use:
=if(countif(a1,"*(L)")>0,"Local","no")

(But I wouldn't use it in this situation.)
 
provided (L) determines the "locality" only you might use the following
formula:

=IF(FIND("(L)",A1),"Local")

HIH
 
Perfect! Thank you!

Dave Peterson said:
If it ends in (L), then:
=IF(RIGHT(A1,3)="(L)","Local","No")

if you really wanted a wild card, you could use:
=if(countif(a1,"*(L)")>0,"Local","no")

(But I wouldn't use it in this situation.)
 
Back
Top