By: Shamima Sultana

In reply to tv.

Hello TV,

Yes, it is possible to do it the other way around where your lookup value is “JSmith” and you want to match “Smith” from the table.

You can achieve this by checking if any of the words in your lookup value contain a word from the lookup list. This requires an array formula (or FILTER/XLOOKUP in modern Excel) that checks if each entry in the table is contained within your search term.

Here’s an example using FILTER:
=FILTER(C2:C11, ISNUMBER(SEARCH(B2:B11, E5)))

1. E5 is your input (like “JSmith”)
2. B2:B11 contains your surnames (like “Smith”)
3. C2:C11 contains departments (like “Sales”)

This formula returns the department(s) whose name exists inside the input like “JSmith”.

Regards
ExcelDemy