Column A contains a varying text - around 1000 entries but the same text will appear in different cells.
In a second separate column (Column G) = a separate table, each cell contains one of a number of set text strings (each can be 2 to 5 characters long). Around 20 in all.
I want to search the start of each cell in column A for each of text strings in column G and if one is present (say G3's contents) I want G3's contents to be shown in column B in the same row as the matched cell from column A.
The matter is complicated by the text to be matched containing both ASC and SC and a further single charcater match being on * (although I can exclude * if this gives a simpler result).
Examples
Column A contains
ASC1 HHHH.........
ASC2 IIII.......
ASC2 AAAA.........
SC2 JJJJ....
TRIAL HOLE........
TRIALHOLE......
OP1 MMMM ...
ASC1COMPLEX
KAN1
PS BAN
*TTC Jiokl jj
Column G
ASC1
ASC2
*
OP1
PS
SC2
TRIAL
VERIFY
So column B should show
ASC1
ASC2
ASC2
SC2
TRIAL
TRIAL
OP1
ASC1
0 (or some other error/omit value)
PS
*
(How) can this be done? I have tried to adapt various solutions from the internet and failed.
Many thanks DaveT