Lookup and return value based on sub-string match
Is there a formula or script that will match sub-strings from one column in another column and return the full value of the sub-string match? e.g.
Input
COL_a COL_b
name 201284_blah_year.ext
address 407284_blah_name.xml
journal 501283_blah_journal_entries.ott
journal_entries 701284_blah_type.dat
year 401184_blah_journal.ext
type 301287_blah_address.txt
Desired output
COL_a COL_b
name 407284_blah_name.xml
address 301287_blah_address.txt
journal 401184_blah_journal.ext
journal_entries 501283_blah_journal_entries.ott
year 201284_blah_year.ext
type 701284_blah_type.dat
Solution 1:
On Column C, write the below formula:-
=VLOOKUP("*_"&A2&".*",B:B,1,FALSE)
and then drag down this till end.
For your quick reference, below is my screenshot