Blog · Google Sheets

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.

The whole formula
=XLOOKUP(E2,A2:A11,C2:C11)
1 · What are you looking for?2 · Where is the value?3 · What should come back?
In one sentence

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.

1 · What are you looking for?
search_key

The cell with the item number: E2.

Change E2 and the result changes right away.

2 · Where is the value?
lookup_range

The column with all item numbers: A2:A11.

Without the header.

3 · What should come back?
result_range

The column with the prices: C2:C11.

Same number of rows as the lookup range.

Rule of thumb: first the cell you look for, then the column to search, then the column the result comes from.

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:

ABCDEF
1Item noItemPriceSearchPrice
2P-101Notepad2.50P-105=XLOOKUP(E2,A2:A11,C2:C11)
3P-102Ballpoint pen1.20
4P-103Ring binder3.90
5P-104Highlighter1.80
6P-105Stapler8.90
…………
11P-110Flipchart paper24.90
1 · Search key (E2)2 · Lookup range (A2:A11)3 · Result range (C2:C11)Formula in F2, result: 8.90

Practice data to copy

Open a blank spreadsheet in Google Sheets. Click “Copy data”, click the cell shown and press Ctrl+V.

Price listpaste into cell A1
Item noItemPrice
P-101Notepad2.50
P-102Ballpoint pen1.20
P-103Ring binder3.90
P-104Highlighter1.80
P-105Stapler8.90
P-106Hole punch9.50
P-107Tape2.20
P-108Sticky notes3.40
P-109Scissors4.60
P-110Flipchart paper24.90
Search fieldpaste into cell E1
Search
P-105

Step by step: how to enter the formula

  1. Click cell F2 and type =XLOOKUP(Google Sheets now shows a small help box with the parts of the formula.
  2. Click E2 and type ,
  3. Select A2 to A11: press the mouse on A2, hold, drag to A11, let go. Then type ,
  4. Select C2 to C11, type ) and press Enter.
  5. Done: F2 shows 8.90, the price of the stapler.
  6. Test it: type “P-110” in E2. F2 shows 24.90 right away.

This is what cell F2 now says:

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 E2Result in F2
P-1012.50
P-1058.90
P-11024.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.

Item and price in one go

Select two columns as the result range. Google Sheets writes both values side by side, from F2.

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.

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.

About the author: Joern Steinz

Joern Steinz is a trainer and the founder of SkillDay. Since 2014 he has facilitated more than 1.000 workshops and trainings, for clients including Allianz, DHL, Lufthansa and Siemens. In his Excel and Google Sheets trainings, teams work with real data and leave with templates they use right away.

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?
Google added XLOOKUP in 2022. Every Google account can use it, no add-on needed.
Comma or semicolon?
That depends on the spreadsheet's locale: File › Settings › Locale. With the United Kingdom or United States, commas separate the parts of the formula.
Which is better, VLOOKUP or XLOOKUP?
XLOOKUP. You do not count columns, the lookup column can sit anywhere, and the note for missing values is built in.
Can I look up values in another sheet?
Yes. For another tab, just click that tab at the bottom while selecting. For a different file, combine XLOOKUP with IMPORTRANGE.
Does this work in Excel too?
Yes, XLOOKUP in Excel has the same structure. You find the guide in our post on XLOOKUP in Excel.

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.