Excel XLOOKUP function

The modern lookup in Excel 365 and 2021: it searches in any direction and matches exactly by default. In Spanish Excel it is called BUSCARX.

Syntax

English Excel

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

Spanish Excel (Mexico)

=BUSCARX(valor_buscado, matriz_buscada, matriz_devuelta, [si_no_se_encuentra])

Spanish Excel (Spain, Latin America)

=BUSCARX(valor_buscado; matriz_buscada; matriz_devuelta; [si_no_se_encuentra])

ArgumentWhat it is
lookup_valueWhat you look for.
lookup_arrayThe column to search.
return_arrayThe column holding the result.
if_not_foundoptionalWhat to show when nothing is found.

Example

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.

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

Common mistake

It does not exist in Excel 2019 or earlier; use VLOOKUP or INDEX + MATCH there. It has two more optional arguments (match and search mode).

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 XLOOKUP

Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons

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.

Frequently asked questions

What is XLOOKUP called in Spanish?
In Spanish Excel it is BUSCARX. The formula =XLOOKUP(E2,$A$2:$A$7,$C$2:$C$7,"Not found") is written =BUSCARX(E2;$A$2:$A$7;$C$2:$C$7;"No existe") (or with commas in Mexico).
Why does XLOOKUP use semicolons in some Excel versions?
It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
What is the most common XLOOKUP mistake?
It does not exist in Excel 2019 or earlier; use VLOOKUP or INDEX + MATCH there. It has two more optional arguments (match and search mode).