Forum Discussion

jako000's avatar
jako000
Copper Contributor
Jan 09, 2020

Excel function for searching for a word in a cell

Cell A1= FAD JAW ASH

Cell B1= BSA

Cell B2= BSD

Cell B3= JAW

 

i need a function that searches for the words B1, B2 and B3 in A1.

In this case JAW should be found in A1. If the function cant find any words in A1 it should say something like no words found

2 Replies

  • Twifoo's avatar
    Twifoo
    Silver Contributor
    If 2 or more words are found in A1, the formula of SergeiBaklan returns the first match while this formula returns the last match:
    =IFNA(LOOKUP(2,1/(
    COUNTIF(A1,”*”&B1:B3&”*”)),
    B1:B3),”No words found”)

Resources