This problem can be solved using the HLOOKUP function.
Wildcards in Excel formulas
Some Excel functions supportwildcards, which can be used to solve this problem.
The asterisk (*) wildcard will ignore empty cells, numbers, and errors.
Like VLOOKUP, HLOOKUP supports wildcards when operating in exact match mode.
Note that HLOOKUP is limited tohorizontal ranges only.
One of XLOOKUP’s hallmark features is flexibility.
For a more complete explanation,see this example.
XLOOKUP supports approximate and exact matching, wildcards (* ?)