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.

Using XLOOKUP to get the month associated with first text value

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.

Using XLOOKUP to get the month associated with first text value

For a more complete explanation,see this example.

XLOOKUP supports approximate and exact matching, wildcards (* ?)

Using XLOOKUP to get the month associated with first text value

Using XLOOKUP to get the month associated with first text value

Using XLOOKUP to get the month associated with first text value

Excel formula: Get first text value in a range

Excel formula: Get first non-blank value in a list

Excel formula: Get first numeric value in a range

Excel HLOOKUP function

Excel XLOOKUP function

Excel ISTEXT function