Look up a customer's region with XLOOKUP
Match a customer ID against a reference table to return their region.
XLOOKUP
Finds a value in one range and returns the matching value from another — in any direction. Below are 3 interactive exercises that put it to work on realistic business data — you write the formula, and get told exactly what went wrong when it does not work.
XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
Available from Excel 2021.
Ordered from most approachable to hardest.
Match a customer ID against a reference table to return their region.
XLOOKUP
Use absolute references so a lookup does not break when copied down a column.
XLOOKUP
Return a readable message instead of #N/A when a lookup finds nothing.
XLOOKUP
Finds a value in one range and returns the matching value from another — in any direction. It belongs to the lookup & reference family, and it shows up constantly in real work — which is why it is worth being genuinely fluent rather than merely familiar.
Before this one, it helps to be comfortable with VLOOKUP. The exercises below assume that ground is covered.
Reading about a function is not the same as being able to write it. The exercises on this page exist because the gap between recognising XLOOKUP and producing it from memory, correctly, on data you have not seen before, only closes by doing it.