Google Sheets XLOOKUP function

Searches one column and returns the value from another, in any direction and with an exact match by default. It has the same name in Spanish Sheets.

Syntax

English Sheets

=XLOOKUP(search_key, lookup_range, result_range, [missing_value])

Spanish Sheets (Mexico locale)

=XLOOKUP(clave_búsqueda, intervalo_búsqueda, intervalo_resultado, [valor_no_encontrado])

Spanish Sheets (Spain, Latin America)

=XLOOKUP(clave_búsqueda; intervalo_búsqueda; intervalo_resultado; [valor_no_encontrado])

ArgumentWhat it is
search_keyWhat you look for.
lookup_rangeThe column to search.
result_rangeThe column holding the result; with several columns it returns the whole row.
missing_valueoptionalWhat to show when nothing is found.

Example

XLOOKUP(key, lookup_range, result_range, missing_value) searches one column and returns the value from another, even one to its left. Spanish Sheets keeps the name XLOOKUP; BUSCARX is the Spanish Excel name.

=XLOOKUP(F2,B2:B7,A2:A7)

Common mistake

Spanish Sheets keeps the name XLOOKUP; BUSCARX is the Spanish Excel name and returns #NAME?.

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(key, lookup_range, result_range, missing_value) searches one column and returns the value from another, even one to its left. Spanish Sheets keeps the name XLOOKUP; BUSCARX is the Spanish Excel name.

Example=XLOOKUP(F2,B2:B7,A2:A7)XLOOKUP: same name in Spanish
Step 1/2

In F3, look up the code of the product named in F2. The code is left of the name, so VLOOKUP cannot do it.

F3
ABCDEFG
1CodeProductStock
2C-101Ground coffee24ProductHoney
3C-102Green tea0Code
4C-103Chocolate57
5C-104Cookies13ProductTortillas
6C-105Honey8Stock
7C-106Oats31
8

Tip: while typing, click a cell or drag across several to insert their reference.

Frequently asked questions

What is XLOOKUP called in Spanish?
It has the same name: XLOOKUP. Functions that started in Google Sheets keep their English name even in a Spanish spreadsheet. What changes is the separator: Spain and much of Latin America separate arguments with semicolons.
Why does XLOOKUP use semicolons in some spreadsheets?
It depends on each spreadsheet's locale, under File > Settings. Where the comma is the decimal mark (Spain, much of South America), arguments are separated by semicolons. Mexico and United States locales use commas.
What is the most common XLOOKUP mistake?
Spanish Sheets keeps the name XLOOKUP; BUSCARX is the Spanish Excel name and returns #NAME?.