XLOOKUP in Google Sheets: explained simply
You have an item number and want its price without hunting through the list. In Google Sheets, XLOOKUP does exactly that, the modern successor to VLOOKUP. Here you see what to click, what stands for what and how to enter the formula step by step. Bonus: the same lookup with VLOOKUP.
=XLOOKUP(E2,A2:A11,C2:C11)XLOOKUP finds a value in one column and returns the matching value from another column: =XLOOKUP(what, where to look, what to return).
What stands for what?
The formula has three required parts. Google Sheets calls them search key, lookup range and result range. You handle each one with a click or a selection.
The cell with the item number: E2.
Change E2 and the result changes right away.
The column with all item numbers: A2:A11.
Without the header.
The column with the prices: C2:C11.
Same number of rows as the lookup range.
The use case: find the price for an item number
On the left is the price list. In E2 you type an item number, and F2 shows the price. The colours show what you click and select:
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Item no | Item | Price | Search | Price | |
| 2 | P-101 | Notepad | 2.50 | P-105 | =XLOOKUP(E2,A2:A11,C2:C11) | |
| 3 | P-102 | Ballpoint pen | 1.20 | |||
| 4 | P-103 | Ring binder | 3.90 | |||
| 5 | P-104 | Highlighter | 1.80 | |||
| 6 | P-105 | Stapler | 8.90 | |||
| … | … | … | … | |||
| 11 | P-110 | Flipchart paper | 24.90 |
Practice data to copy
Open a blank spreadsheet in Google Sheets. Click “Copy data”, click the cell shown and press Ctrl+V.
| Item no | Item | Price |
|---|---|---|
| P-101 | Notepad | 2.50 |
| P-102 | Ballpoint pen | 1.20 |
| P-103 | Ring binder | 3.90 |
| P-104 | Highlighter | 1.80 |
| P-105 | Stapler | 8.90 |
| P-106 | Hole punch | 9.50 |
| P-107 | Tape | 2.20 |
| P-108 | Sticky notes | 3.40 |
| P-109 | Scissors | 4.60 |
| P-110 | Flipchart paper | 24.90 |
| Search |
|---|
| P-105 |
Step by step: how to enter the formula
- Click cell F2 and type
=XLOOKUP(Google Sheets now shows a small help box with the parts of the formula. - Click E2 and type
, - Select A2 to A11: press the mouse on A2, hold, drag to A11, let go. Then type
, - Select C2 to C11, type
)and press Enter. - Done: F2 shows 8.90, the price of the stapler.
- Test it: type “P-110” in E2. F2 shows 24.90 right away.
This is what cell F2 now says:
=XLOOKUP(E2,A2:A11,C2:C11)What your result looks like
Whatever is in E2, F2 shows the matching price. If the number does not exist, Google Sheets shows #N/A. The friendlier way is right below.
| In E2 | Result in F2 |
|---|---|
| P-101 | 2.50 |
| P-105 | 8.90 |
| P-110 | 24.90 |
| P-999 | #N/A |
Three extras once XLOOKUP works
A friendly note instead of #N/A
The fourth part of the formula is missing_value. It shows when the number is not in the list.
=XLOOKUP(E2,A2:A11,C2:C11,"Not found")Item and price in one go
Select two columns as the result range. Google Sheets writes both values side by side, from F2.
=XLOOKUP(E2,A2:A11,B2:C11)The same lookup with VLOOKUP
The classic still works. The 3 stands for the third column of the table, the 0 for an exact match.
=VLOOKUP(E2,A2:C11,3,0)If it does not work
- #N/A – the number is not in the list, often because of a space or typo in E2. Add a note as the fourth part.
- The formula is marked as an error – you typed semicolons instead of commas. With English locale settings, commas separate the parts.
- Wrong value – the lookup range and result range have different lengths. Both must end in row 11.
- VLOOKUP returns something odd – the 0 at the end is missing. Without it, VLOOKUP only searches approximately.
Google Sheets your team actually uses
This exercise comes from our Google Sheets training. Your team works with XLOOKUP, FILTER and drop-downs on its own lists, in the advanced Google Sheets training or live online. For Excel users: XLOOKUP in Excel explained simply.
Deutsche Version: SVERWEIS und XLOOKUP in Google Tabellen · Next step: automate Google Sheets without Apps Script · Excel tips: XLOOKUP, SUMIFS, drop-down lists and FILTER explained simply
XLOOKUP in Google Sheets: frequently asked questions
Since when does Google Sheets have XLOOKUP?
Comma or semicolon?
Which is better, VLOOKUP or XLOOKUP?
Can I look up values in another sheet?
Does this work in Excel too?
Google Sheets is a trademark of Google LLC; Microsoft and Excel are trademarks of the Microsoft group of companies. SkillDay is an independent training provider. The practice data is fictitious.