Using a MS Excel formula that finds and extracts the very first (1st) instance/occurrence of a specific word found within a Column range of Keywords.
In Cell A2 I have a sub-string of text containing the following:
Karen was born in Akron, OH and attended college in Mobile, AL before moving to Atlanta, GA soon after her parents retired and now lives in Raleigh, NC.
Column B2:B10 (List of City & State keywords in a column list)
Tulsa, OK
New York, NY
Boise, ID
Atlanta, GA
Baltimore, MD
Raleigh, NC
Pittsburgh, PA
Akron, OH
Mobile, AL
I've attempted to use the following formula's but without success.
=IFERROR(INDEX($B$2:$B$10,MATCH(TRUE,COUNTIF(A2,"*"&$B$2:$B$10&"*")>0,0)),"")
-AND-
=IFERROR(INDEX($B$2:$B$10,MATCH(TRUE,ISNUMBER(SEARCH"*"&$B$2:$B$10&"*",A2)),0)),"")
Both Results Returned: Mobile, AL
Expected Results:
Correct Results = Akron, OH
Note: Although there are four possible matching results, instead it matches and retrieves/extracts Akron, OH, as it searches and finds the keyword position from Right to Left.