Look up a value with XLOOKUP or VLOOKUP
Find a product, customer, or code in a list and bring back its price, email, or name, without searching by hand.
FormulasIntermediate12 minExcel · Google Sheets
Example content. The numbers are fictional and made for learning.
Goal
Type a product name and get its price from a price list.
Why this is useful
Quotes, invoices, and order forms all repeat the same move: look something up in a list. A lookup formula does it instantly and never copies the wrong row.
Example
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Product | Price | Find | |
| 2 | Mug | 12 | Poster | |
| 3 | Tote bag | 15 | ||
| 4 | Poster | 22 | ||
| 5 | Notebook | 9 | ||
| 6 | Sticker pack | 4 | ||
| 7 | Price of Poster | 22.00=XLOOKUP(D2,A2:A6,B2:B6) |
Steps
1. Make a list with a unique first column
Put product names in column A and prices in column B. Every name should appear only once.
2. Type what to find
Type a product name in an empty cell, such as D2.
3. Use XLOOKUP
Type =XLOOKUP(D2,A2:A6,B2:B6): what to find, where to look, what to return. Swedish uses XLETAUPP.
4. Or VLOOKUP in older Excel
Type =VLOOKUP(D2,A2:B6,2,0): what to find, the whole table, the column number to return, and 0 for an exact match. Swedish uses LETARAD.
5. Handle a name that is missing
XLOOKUP takes a fourth argument for that: =XLOOKUP(D2,A2:A6,B2:B6,"Not found"). For VLOOKUP, wrap it in IFERROR.
Formulas by language
Cell names such as B2 stay the same. The function name and the character between arguments follow the spreadsheet language. The English line in each list is the reference form used on this site, not a universal spelling. When the decimal sign is a comma, arguments are usually separated with a semicolon, because the comma is already used in numbers.
Price of the product typed in D2.
English (United States)
Decimals look like 1.5. Arguments are separated with ,.
=XLOOKUP(D2,A2:A6,B2:B6)Swedish (Sweden)
Decimals look like 1,5. Arguments are separated with ;.
=XLETAUPP(D2;A2:A6;B2:B6)German (Germany)
Decimals look like 1,5. Arguments are separated with ;.
=XVERWEIS(D2;A2:A6;B2:B6)French (France)
Decimals look like 1,5. Arguments are separated with ;.
=RECHERCHEX(D2;A2:A6;B2:B6)Spanish (Spain)
Decimals look like 1,5. Arguments are separated with ;.
=BUSCARX(D2;A2:A6;B2:B6)Spanish (Mexico)
Decimals look like 1.5. Arguments are separated with ,.
=BUSCARX(D2,A2:A6,B2:B6)Portuguese (Brazil)
Decimals look like 1,5. Arguments are separated with ;.
=PROCX(D2;A2:A6;B2:B6)Italian (Italy)
Decimals look like 1,5. Arguments are separated with ;.
=CERCA.X(D2;A2:A6;B2:B6)Dutch (Netherlands)
Decimals look like 1,5. Arguments are separated with ;.
=X.ZOEKEN(D2;A2:A6;B2:B6)
The same with VLOOKUP, for older Excel versions.
English (United States)
Decimals look like 1.5. Arguments are separated with ,.
=VLOOKUP(D2,A2:B6,2,0)Swedish (Sweden)
Decimals look like 1,5. Arguments are separated with ;.
=LETARAD(D2;A2:B6;2;0)German (Germany)
Decimals look like 1,5. Arguments are separated with ;.
=SVERWEIS(D2;A2:B6;2;0)French (France)
Decimals look like 1,5. Arguments are separated with ;.
=RECHERCHEV(D2;A2:B6;2;0)Spanish (Spain)
Decimals look like 1,5. Arguments are separated with ;.
=BUSCARV(D2;A2:B6;2;0)Spanish (Mexico)
Decimals look like 1.5. Arguments are separated with ,.
=BUSCARV(D2,A2:B6,2,0)Portuguese (Brazil)
Decimals look like 1,5. Arguments are separated with ;.
=PROCV(D2;A2:B6;2;0)Italian (Italy)
Decimals look like 1,5. Arguments are separated with ;.
=CERCA.VERT(D2;A2:B6;2;0)Dutch (Netherlands)
Decimals look like 1,5. Arguments are separated with ;.
=VERT.ZOEKEN(D2;A2:B6;2;0)
A message instead of #N/A when the product is not in the list.
English (United States)
Decimals look like 1.5. Arguments are separated with ,.
=IFERROR(VLOOKUP(D2,A2:B6,2,0),"Not found")Swedish (Sweden)
Decimals look like 1,5. Arguments are separated with ;.
=OMFEL(LETARAD(D2;A2:B6;2;0);"Not found")German (Germany)
Decimals look like 1,5. Arguments are separated with ;.
=WENNFEHLER(SVERWEIS(D2;A2:B6;2;0);"Not found")French (France)
Decimals look like 1,5. Arguments are separated with ;.
=SIERREUR(RECHERCHEV(D2;A2:B6;2;0);"Not found")Spanish (Spain)
Decimals look like 1,5. Arguments are separated with ;.
=SI.ERROR(BUSCARV(D2;A2:B6;2;0);"Not found")Spanish (Mexico)
Decimals look like 1.5. Arguments are separated with ,.
=SI.ERROR(BUSCARV(D2,A2:B6,2,0),"Not found")Portuguese (Brazil)
Decimals look like 1,5. Arguments are separated with ;.
=SEERRO(PROCV(D2;A2:B6;2;0);"Not found")Italian (Italy)
Decimals look like 1,5. Arguments are separated with ;.
=SE.ERRORE(CERCA.VERT(D2;A2:B6;2;0);"Not found")Dutch (Netherlands)
Decimals look like 1,5. Arguments are separated with ;.
=ALS.FOUT(VERT.ZOEKEN(D2;A2:B6;2;0);"Not found")
The same spoken language can use different separators in different countries. Spanish in Spain often uses a comma for decimals and a semicolon between arguments. Spanish in Mexico often uses a period and a comma. If a formula is rejected, check the spreadsheet locale.
Excel and Google Sheets
- XLOOKUP needs Microsoft 365, Excel 2021 or later, or Google Sheets. Excel 2019 and older show #NAME?.
- VLOOKUP works in every version. Always give 0 or FALSE as the last argument for an exact match.
- Neither function cares about capital letters: Poster and poster match.
- Function names and the separator between arguments follow the spreadsheet language. Excel uses the language of your installation; Google Sheets uses the spreadsheet locale under File, Settings.
If something goes wrong
#N/A appears.
The value is not in the list. Check for extra spaces or a different spelling, or show a message with IFERROR.
VLOOKUP returns the wrong row.
The last argument is missing, so it looks for a near match. Add 0 for an exact match.
The result breaks after inserting a column.
VLOOKUP counts columns by number. Update the number, or switch to XLOOKUP, which points at the return column directly.