if statement with partial text searching

A

Alex

I want to create an if statement for a partial text search.
IF a cell has "CA" anywhere in it, I want my target cell
to be empty. IF not, I want the word, "Borough".

For Example;
A B
Denali
Bethel CA
Bristol Bay
Nome CA

Wanted Result:
A B
Denali Borough
Bethel CA
Bristol Bay Borough
Nome CA
 
B

Biff

Hi Alex!

Here's one way:

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH("
CA "," "&A1&" ")))),"","Borough")

Biff
 

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