if statement with partial text searching

  • Thread starter Thread starter Alex
  • Start date Start date
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
 
Hi Alex!

Here's one way:

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

Biff
 
Back
Top