How to use XLOOKUP in Excel (basics with examples)

Updated · DeskHowTo

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.

Jump to

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

  1. Put the value to find in E2 (product ID, email, SKU).
  2. In F2 type =XLOOKUP(E2, A2:A100, C2:C100).
  3. Press Enter — Excel returns the matching value from C, or #N/A if missing.

Friendly not-found text

  1. Extend the formula: =XLOOKUP(E2, A2:A100, C2:C100, "Not found").
  2. Fill down the column; lock arrays with $A$2:$A$100 and $C$2:$C$100 if needed.

Return multiple columns (365)

  1. Return a whole row slice: =XLOOKUP(E2, A2:A100, B2:D100).
  2. Results spill across columns on Microsoft 365.
  3. Clear cells to the right first so #SPILL! does not appear.

XLOOKUP vs VLOOKUP

NeedPrefer
Look left of the keyXLOOKUP
Stable formulas when columns insertXLOOKUP (arrays, not index #)
Very old Excel without XLOOKUPVLOOKUP / 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 -1 to 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.

Sources checked: Microsoft Support: XLOOKUP function. Verified October 2026.