XLOOKUP vs VLOOKUP
XLOOKUP takes the range to search and the range to return separately, matches exactly by default and has a built in message for a missing value. VLOOKUP still works everywhere and is fine for a simple exact lookup to the right.
Last updated 23 November 2026
| A | B | |
|---|---|---|
| 1 | Code | Name |
| 2 | P110 | Item A |
| 3 | P245 | Item B |
| 4 | P390 | Item C |
| 5 | P999 |
In B5, write =XLOOKUP(A5,$A$2:$A$4,$B$2:$B$4,"Not listed") and it shows Not listed.
What is different
XLOOKUP(lookup_value, lookup_range, return_range, if_not_found, match_mode, search_mode) names the column to search and the column to return, so there is no column number to count and the answer can be to the left of the key.
It matches exactly unless you ask otherwise. The fourth argument is returned when nothing matches, so an IFERROR wrapper is not needed. A match mode of -1 returns an exact match or the next smaller item, which is how you do a band lookup without sorting.
When to use VLOOKUP anyway
Some workbooks and some tests are opened in programs that do not have XLOOKUP, and VLOOKUP is understood by everyone. If a task says to use a lookup function without naming one, VLOOKUP, XLOOKUP and INDEX with MATCH are all accepted.
Not found
Both give #N/A for a missing value. VLOOKUP needs IFERROR to replace it, while XLOOKUP takes the replacement as its fourth argument, and an empty text there gives a blank cell.
Practise it
Module 3, Lookups, has 20 tasks on this, each checked on hidden data: open module 3. You can also try formulas in the sandbox.