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.