Using wildcards in formulas

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

Dave Peterson

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.)
 
J

Jarek Kujawa

provided (L) determines the "locality" only you might use the following
formula:

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

HIH
 
K

KrispyData

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.)
 

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