XLOOKUP
Finds a value in one range and returns its match from another.
- Look up
- Practised in 2 lessons
Worked example
D2=XLOOKUP(C2,B2:B4,A2:A4)
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Member | Locker | Find | Member |
| 2 | Ravi | 104 | 118 | Lucia |
| 3 | Lucia | 118 | ||
| 4 | Tom | 131 |
The answer can be to the left, which VLOOKUP cannot do.
How to write it
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], …)
lookup_value- What to find.
lookup_array- Where to look for it.
return_array- Where the answer is.
if_not_found- What to show when nothing matches.
Try XLOOKUP yourself
One task in a real spreadsheet, about a minute. Your formula is checked on changed data, like every task here.
Try it nowWatch out for
- The two ranges must be the same length.
- Excel 2019 and earlier do not have it. Use INDEX and MATCH there.