How to use XLOOKUP in Excel (basics with examples)
In Excel for Microsoft 365 / Excel 2021–2024 (verified 2026-10-24), type =XLOOKUP(lookup_value, lookup_array, return_array) for an exact match. Example: =XLOOKUP(E2, A2:A100, C2:C100) returns column C for the ID in E2.
Optional fourth argument if_not_found shows a friendly message instead of #N/A. Prefer XLOOKUP over VLOOKUP when you need to return a column to the left or avoid brittle column index numbers.
Applies to Excel for Microsoft 365, Excel 2021/2024, Excel for Mac and Excel for the web. Older perpetual Excel (2016/2019 without 365) may lack XLOOKUP — use INDEX/MATCH or VLOOKUP there.
Write a basic XLOOKUP
Exact match lookup
- Put the value to find in E2 (product ID, email, SKU).
- In F2 type
=XLOOKUP(E2, A2:A100, C2:C100). - Press Enter — Excel returns the matching value from C, or
#N/Aif missing.
Friendly not-found text
- Extend the formula:
=XLOOKUP(E2, A2:A100, C2:C100, "Not found"). - Fill down the column; lock arrays with
$A$2:$A$100and$C$2:$C$100if needed.
Return multiple columns (365)
- Return a whole row slice:
=XLOOKUP(E2, A2:A100, B2:D100). - Results spill across columns on Microsoft 365.
- Clear cells to the right first so
#SPILL!does not appear.
XLOOKUP vs VLOOKUP
| Need | Prefer |
|---|---|
| Look left of the key | XLOOKUP |
| Stable formulas when columns insert | XLOOKUP (arrays, not index #) |
| Very old Excel without XLOOKUP | VLOOKUP / INDEX-MATCH |
Our take: new workbooks should default to XLOOKUP; keep VLOOKUP only when sharing with older Excel users.
If it fails
- #N/A: no exact match — trim spaces, check number vs text.
- #SPILL!: blocked cells in the spill range.
- Wrong row: duplicate keys — XLOOKUP returns the first match by default; use search_mode
-1to search last-to-first. - Name not recognized: workbook opened in Excel that lacks XLOOKUP.
Frequently asked questions
What is XLOOKUP in Excel?
A lookup function that finds a value in one range and returns a result from another range.
Is XLOOKUP better than VLOOKUP?
Usually yes — it can look left, uses arrays instead of column indexes, and supports if_not_found.
Does XLOOKUP need FALSE for exact match?
Exact match is the default; you do not pass FALSE like VLOOKUP.
Can XLOOKUP return multiple columns?
Yes on Microsoft 365 when return_array is wider than one column.
XLOOKUP on Excel for the web?
Yes, in current Excel for the web with a supporting Microsoft 365 account.