find characters in text string

J

JAYB

In a spreadsheet, I have a text string with names (not fixed location).
I want to find the 3 characters of the name and if it matches show it
as the result in the column. For that I have added in 1 column a table
with the possible 3 characters of the name.

With the LEN, SEARCH and MID function I have been able to do this
partially. It only works when the 3 characters to search for is on the
same line.

Please help with a smart solution.
 
J

JAYB

KL, below is an example of what I have. thanks for your help
Jay

Text A B C Table

Exp_Claim Jan Graaf 15 19 Gra GRA
Expense Jay #VALUE! 11 #VALUE! WIN
Sunny de Winter Exp_Claim #VALUE! 25 #VALUE! JAY
Exp_Claim W. A. de Bouvrie 20 26 Bou BOU

Formula's
'=SEARCH(N2:N2,G2) A
'=LEN(G2) B
=MID(G2,K2-(K2-J2),3) C
 
Top