← Error directory

XLOOKUP vs VLOOKUP: Which Should You Use?

Choosing between XLOOKUP and VLOOKUP is one of the highest-traffic Excel questions. This guide compares behavior, error handling, and when to keep VLOOKUP for compatibility.

Side-by-side comparison

TopicVLOOKUPXLOOKUP
Lookup directionRight of key onlyAny column / row
Default matchApproximate unless FALSEExact
If not found#N/ACustom if_not_found
Column insert safetyBreaks with column indexReturn range is explicit
Excel versionAll modern ExcelMicrosoft 365 / 2021+

XLOOKUP patterns

=XLOOKUP(E2, A2:A1000, B2:B1000, "Not found")
=XLOOKUP(E2, A2:A1000, B2:D1000)
=XLOOKUP(E2, A2:A1000, B2:B1000, , -1)

Prefer a single return column on dense sheets to avoid #SPILL!.

When VLOOKUP is still useful

=IFNA(VLOOKUP(E2, A:B, 2, FALSE), "Not found")

Migration checklist

  1. Replace approximate VLOOKUP with intentional XLOOKUP match modes
  2. Stop using column numbers; select the return range
  3. Use if_not_found instead of blanket IFERROR

Related errors

XLOOKUP not found · VLOOKUP hidden characters · Error directory

ExcelFormulaAI · Nikhil Kappagantula