VLOOKUP vs XLOOKUP

XLOOKUP is the modern VLOOKUP: it looks in any direction, matches exactly by default and handles "not found" without IFERROR.

VLOOKUPXLOOKUP
Available inEvery versionExcel 365 and 2021
Default matchApproximate (you must add FALSE)Exact
Lookup columnOnly the first one in the rangeAny, even to the right
If not found#N/A (needs IFERROR)Fourth argument
If you insert columnsThe column number goes staleKeeps working

Syntax and example

VLOOKUP

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

=VLOOKUP(F2,A2:C8,3,FALSE)

Looks up a value in a table’s first column and returns data from another column on that row.

XLOOKUP

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found])

=XLOOKUP(E2,$A$2:$A$7,$C$2:$C$7,"Not found")

The modern lookup in Excel 365 and 2021: it searches in any direction and matches exactly by default.

Which one to use?

Use XLOOKUP if everyone opening the file has Excel 365 or 2021. Use VLOOKUP if it will be shared with older versions, and do not forget FALSE.

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice it

Solve the exercise on the sheet; it is checked instantly. See all lessons · Formula translator

XLOOKUP

XLOOKUP(value, lookup_range, return_range, if_not_found) is Excel 365’s modern lookup: it searches in any direction, matches exactly by default and lets you choose what to show when nothing is found.

Example=XLOOKUP(E2,A2:A7,C2:C7,"No existe")BUSCARX = XLOOKUP

In F2, look up the average for the ID in E2. It will be copied to F3, whose ID does not exist; in that case show "Not found".

F2
ABCDEFG
1Student IDStudentAverageFindAverage
2A-2201Ana9.2A-2204
3A-2202Luis7.8A-2299
4A-2203Sofía8.6
5A-2204Diego6.9
6A-2205Valeria9.7
7A-2206Mateo8.1
8

Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.

Frequently asked questions

What is the difference between VLOOKUP and XLOOKUP?
XLOOKUP is the modern VLOOKUP: it looks in any direction, matches exactly by default and handles "not found" without IFERROR.
When should I use VLOOKUP or XLOOKUP?
Use XLOOKUP if everyone opening the file has Excel 365 or 2021. Use VLOOKUP if it will be shared with older versions, and do not forget FALSE.