ExcelFluent
Start free

How to use XLOOKUP in Excel

XLOOKUP is the modern replacement for VLOOKUP. It looks in one column and returns from another, in any direction, and it can show your own message when nothing is found.

Syntax

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found])
lookup_value
What you are looking for.
lookup_array
The single column to search in.
return_array
The column to return from. It can be to the left or the right.
if_not_found
Optional. What to show when there is no match, such as "Not found".

Try it now · free, no sign-up

Find an ID from a name

  1. In G2, return the ID for the name in F2. The ID column is to the left of Name, which VLOOKUP cannot do.
  2. Zoe is not on the list. In G3, look up F3 but show Not found instead of #N/A.
ABCDEFG
1IDNameDepartmentSalaryFind nameID
2E104MeganFinance72,000.00Priya
3E101CarlosHR58,000.00Zoe
4E106PriyaIT91,000.00
5E103TylerSales54,000.00
6E102JasmineIT86,000.00
7E105EthanFinance67,000.00

Loading the live spreadsheet…

Why XLOOKUP is easier than VLOOKUP

You pick the search column and the return column separately, so there is no column number to count and nothing breaks when someone inserts a column. It defaults to an exact match, so there is no FALSE to forget.

Which Excel versions have XLOOKUP?

Microsoft 365, Excel 2021 and later, and Excel for the web. Excel 2019 and older do not, which is why many interview tests still ask for VLOOKUP or INDEX MATCH.

Common mistakes

#VALUE!
The lookup and return columns are different sizes. B2:B7 and A2:A8 will not work together.
#NAME?
Your Excel is older than 2021 and does not have XLOOKUP. Use INDEX MATCH instead.
#N/A
Nothing matched. Add the fourth argument to show a message instead.

Practice it until it sticks

ExcelFluent has 42 hands-on lessons, from SUM to XLOOKUP, plus 5 real work projects and a final challenge that uses everything. Every answer is checked instantly. The first 5 lessons and 1 work project (an invoice with tax) are free.

Start the free lessons → Open the full XLOOKUP lesson

Frequently asked questions

Can XLOOKUP return more than one column?

Yes. If the return array is several columns wide (for example C2:D7), the result spills across into the cells to the right.

Is XLOOKUP case sensitive?

No. "priya" and "Priya" match.

XLOOKUP or INDEX MATCH?

XLOOKUP is simpler to write. INDEX MATCH works in every version of Excel. If the test does not say, either is fine.

Related practice