Start free

XLOOKUP vs VLOOKUP: which should you use?

Works in XLOOKUP: Excel 365, 2021 and later; VLOOKUP: every version

Key takeaways

  • Use XLOOKUP when everyone who opens the file has Excel 365 or 2021 and later.
  • XLOOKUP matches exactly by default; VLOOKUP needs FALSE or it matches approximately.
  • XLOOKUP names the return column as a range, so inserting a column can't break it.
  • For files that must open in Excel 2019 or older, use INDEX and MATCH instead of VLOOKUP.
On this page

Use XLOOKUP whenever everyone who opens the file has Excel for Microsoft 365 or Excel 2021 and later. It finds exact matches by default, can return a column to the left, keeps working when columns are inserted, and has its own “not found” value. Use VLOOKUP, or better INDEX and MATCH, only when the file must open in Excel 2019 or older.

The same lookup, written both ways

Find the price of the code in E2. Both formulas return the same answer here:

F2=XLOOKUP(E2,A2:A6,C2:C6)
RowABCDEF
1CodeProductPriceFindPrice
2A-101Keyboard$49.00A-104$59.00
3A-102Mouse$19.00
4A-103Monitor$189.00
5A-104Webcam$59.00
6A-105Headset$79.00
=XLOOKUP(E2,A2:A6,C2:C6) → $59.00
=VLOOKUP(E2,A2:C6,3,FALSE) → $59.00

The difference is in what each formula says. XLOOKUP reads as “find E2 in the codes, return the prices”. VLOOKUP reads as “find E2 in the first column of this table, return its 3rd column, exactly”. That 3 and that FALSE are where VLOOKUP goes wrong.

The five differences that matter

XLOOKUP VLOOKUP
Default match Exact Approximate, unless you add FALSE
Return column A range you point at A number you count
Look to the left Yes No
After inserting a column Still right Returns the wrong column
When nothing is found Its 4th argument #N/A, unless wrapped in IFNA

1. Exact match by default

Forget FALSE in VLOOKUP and it switches to an approximate match that assumes sorted data. On unsorted codes that can return a neighbouring row’s price with no error at all, the worst kind of mistake. XLOOKUP is exact unless you ask otherwise.

2. Inserting a column doesn’t break it

Insert a “Colour” column between Product and Price, and =VLOOKUP(E2,A2:D6,3,FALSE) now returns the colour: the 3 still counts from the left. XLOOKUP’s return range moves with the prices, so it keeps returning prices.

3. Looking left

VLOOKUP can only return columns to the right of the one it searches. Finding a product’s code from its name needs XLOOKUP, or INDEX and MATCH.

4. A value for “not found”

=XLOOKUP(E2,A2:A6,C2:C6,"Not listed") handles a missing code in one function. VLOOKUP needs =IFNA(VLOOKUP(E2,A2:C6,3,FALSE),"Not listed"). More on that in #N/A error in Excel.

5. Where it works

VLOOKUP works in every version of Excel. XLOOKUP needs Excel for Microsoft 365, Excel 2021 or later, or Excel for the web; older versions show #NAME?.

When VLOOKUP is still the right call

  • The workbook goes to people on Excel 2019 or older. (INDEX and MATCH is still the stronger choice there.)
  • You’re editing an existing model full of VLOOKUPs, and consistency matters more than switching one formula.
  • An interview test asks for it by name. Many still do, so know both.

FAQ

Is XLOOKUP faster than VLOOKUP?

For everyday sheets the difference isn't noticeable. Choose on correctness and readability, where XLOOKUP wins.

Will XLOOKUP work for someone with Excel 2019?

No. They'll see #NAME?. If your file goes to people on older versions, use INDEX and MATCH.

Can I replace every VLOOKUP with XLOOKUP?

Yes, as long as the file is only used in Excel 365 or 2021 and later. Check results after converting: a VLOOKUP that relied on approximate match will behave differently.

Summarize this guide withChatGPTPerplexityClaude

Keep going

Guides that build on this one.

All guides
Errors & fixesPractice sheet

#N/A error in Excel: what it means and how to fix it

#N/A means a lookup didn't find what it was looking for. Here are the six usual causes, how to spot each one on the sheet, and the fix, with a practice sheet.

2 min read · Updated
Errors & fixesPractice sheet

#DIV/0! error in Excel: what it means and how to fix it

#DIV/0! means a formula divided by zero or by an empty cell. Why it happens, averages of nothing included, and how to show a clean result, with a practice sheet.

2 min read · Updated
Interview prepPractice sheet

Excel data cleaning interview question

Extra spaces, names in the wrong order, numbers stored as text and dates that aren't dates: the cleaning task interviewers love, solved with formulas, and a sheet that grades yours.

4 min read · Updated

Reading is step one. Writing the formula is the skill.

Practise in a live grid that grades what your formula calculates, with a specific hint when it's wrong.

Runs in your browser · Graded on your result · No install