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 6 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.
Need a refresher? Learn XLOOKUP — syntax, a worked example and where it goes wrong.
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
Look up a value that only exists two tables away from what you started with.
XLOOKUP
Identify the one situation VLOOKUP genuinely cannot handle.
VLOOKUP · XLOOKUP
Diagnose a match failure where both values look identical on screen.
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.