XLOOKUP vs VLOOKUP: which one to use

XLOOKUP arrived in Excel 365 and Excel 2021 to replace VLOOKUP, HLOOKUP and most uses of INDEX/MATCH. Both bring a value from another table, but they do not fail in the same ways. Here are the differences that matter in daily work, with side-by-side examples, and what to use when the file is too big for Excel.

Updated

The same lookup, written both ways

Say you have an Orders sheet with a customer code in column C, and a Customers sheet with codes in column A and names in column B. To bring the customer name into each order:

=VLOOKUP(C2, Customers!A:B, 2, FALSE)
=XLOOKUP(C2, Customers!A:A, Customers!B:B, "Unknown")

VLOOKUP takes the whole table and a column number. XLOOKUP takes the column to search and the column to return, separately. That one change explains most of the differences below.

The differences that matter

VLOOKUPXLOOKUP
Default matchApproximate (if the 4th argument is left out)Exact
Return columnA number, counted from the key columnA range you point to
Look to the left of the keyNoYes
Inserting a column in the sourceCan break the column numberNo effect
Value when not found#N/A, wrap in IFNABuilt-in fallback argument
Available inEvery version of ExcelExcel 365 and Excel 2021 or later

When VLOOKUP is still fine

  • Your workbook must open in Excel 2016 or 2019, which do not have XLOOKUP.
  • The table is stable, the key is the first column, and you always write FALSE.
  • You share files with people who know VLOOKUP and not XLOOKUP.

When XLOOKUP is clearly better

  • The value to return sits to the left of the key.
  • The source table changes shape, with columns added or moved.
  • You want a readable fallback such as “Unknown” instead of #N/A.
  • You want to search from the last row, for example to find the most recent order of a customer (XLOOKUP’s search mode argument).

Common traps for both

  • Trailing spaces and different capitals make keys not match. Clean the key columns with TRIM first.
  • A code stored as a number on one side and as text on the other does not match in Excel. Convert one side.
  • Duplicate keys in the lookup table: both functions return the first match and ignore the others, without a warning.

On large files, both become slow

In Excel, every lookup cell searches the table on its own. On hundreds of thousands of rows, a few lookup columns make recalculation slow, whichever function you choose. Beyond 1,048,576 rows, the data does not fit in a sheet.

Big Sheets is a spreadsheet for files of several million rows that runs in your browser. It accepts both functions with their Excel names, in English or French, and runs a formula on the whole column in one pass. Columns are named instead of cell ranges:

=VLOOKUP([@Code], Customers![Code], 2, FALSE)
=XLOOKUP([@Code], Customers![Code], Customers![Name], "Unknown")

Keys are compared as text and ignoring capitals, which removes the number-versus-text and case traps. Both do exact matches, which is what lookups need almost every time: VLOOKUP without its fourth argument does not switch to approximate match, and if several rows match, the first one wins. For lookups without formulas, the Lookup panel brings columns from another sheet in a few clicks, and the Join mode keeps every match instead of the first.

Migrating a workbook from VLOOKUP to XLOOKUP

You do not need to rewrite everything at once. Replace VLOOKUP where it hurts: formulas that broke when someone inserted a column, lookups wrapped in IFERROR that hide real problems, and tables where the key is not the first column.

For each one, point XLOOKUP to the key column and to the column to return, instead of the whole table and a number. Add the fallback as the fourth argument, then delete the IFNA or IFERROR around it. Compare a few results with the old formula before deleting it, and check the rows that returned #N/A: they should now show your fallback, and nothing else should change.

Our recommendation

In Excel 365, write XLOOKUP for new work: it is safer by default and easier to read. Keep VLOOKUP where files must open in older versions. When the file no longer fits in Excel, or the lookups make it crawl, run the same formula in Big Sheets, on every row, without uploading your data. You can try it on sample data first, without an account.

Try it on your own file

Open it in Big Sheets: no sign-up, and your file never leaves this browser.

One plan: €29 incl. VAT per month, everything included, cancel any time. See pricing

Questions

Is XLOOKUP faster than VLOOKUP?
In Excel, the difference is small for exact matches; the cost comes from having one lookup per cell. In Big Sheets, both run on the whole column at once.
Does XLOOKUP work in Excel 2016?
No. XLOOKUP needs Excel 365 or Excel 2021 and later.
Can XLOOKUP return several columns?
In Excel 365, yes, by returning a range. In Big Sheets, write one formula per column, or use the Lookup panel to bring several columns at once.