How do I find specific words and reference it

  • Thread starter Thread starter Shaz
  • Start date Start date
S

Shaz

I want Excel to say "Westmidlands" if Postcode in column J starts with "B or
CV or W" and "Scotland" if the postcode starts with "AB or G". How do I do
that?
 
I want Excel to say "Westmidlands" if Postcode in column J starts with "B or
CV or W" and "Scotland" if the postcode starts with "AB or G". How do I do
that?

Try this formula:

=IF(OR(EXACT(LEFT(J1,1),"B"),EXACT(LEFT(J1,2),"CV"),
EXACT(LEFT(J1,1),"W")),"Westmidlands",IF(OR(EXACT(LEFT(J1,2),"AB"),
EXACT(LEFT(J1,1),"G")),"Scotland","not specified what to say"))

Hope this helps / Lars-Åke
 
Back
Top