Forum Discussion
XLOOKUP wildcard matching issue
- Jun 30, 2024
RSGrayson There were no wildcards used in your original formula. To return the first matching record that contains the lookup_value, you need to concatenate an asterisk ("*") to both the start and end of the lookup_value as follows:
=XLOOKUP("*" & [@[Medical Conditions]] & "*", VA_List[VA List of Disablities], VA_List[VA List of Disablities], "Not found", 2)
If further explanation is needed, please see: https://exceljet.net/formulas/xlookup-wildcard-match-example
For which text should there be 3 matches? I see only unique values.
Other issues:
Table "VA_List" contains bad data.
1. Most entries have a period at the end - but not all. The search criteria in table "MedConV" is without period.
2. Some entries have extra spaces at the end.
I would suggest to clean up the data.
You could use data validation in table "MedConV" to ensure that only valid text entries are possible.