Blog · Excel

XLOOKUP in Excel: explained simply

You have an order list with item numbers and need the price for each one. The prices sit in a second table. XLOOKUP fetches them automatically. Here you see what goes into the formula, what to select and how to enter it step by step.

The whole formula
=XLOOKUP(H2, A2:A11, D2:D11)
1 · What am I looking for?2 · Where do I look?3 · What do I want back?
In one sentence

XLOOKUP asks: what am I looking for, where do I look, and what should come back? Put those three answers, separated by commas, inside the brackets.

What stands for what?

The formula has three parts. Each part is a question you answer with one click or one selection.

1 · What am I looking for?
lookup_value

One single cell. Here the item number you want the price for: H2.

You click the cell once.

2 · Where do I look?
lookup_array

One column in the other table that holds all item numbers: A2:A11.

You select the column from the first to the last number, without the header.

3 · What do I want back?
return_array

The column with the answer, here the prices: D2:D11.

You select it the same way, from row 2 to row 11.

Rule of thumb: parts 2 and 3 start and end in the same row. Then Excel always finds the matching price.

The use case: fetch the price for every item number

On the left is the master data with all items and prices, on the right the order list. Column J should show the price for each order. This is what it looks like in Excel; the colours show what you select:

ABCD…HIJ
1Item noItem…PriceItem noQuantityPrice
21001Sunglasses Classic…89.00100512=XLOOKUP(H2,A2:A11,D2:D11)
31002Travel pillow…24.90100240
41003Perfume 50 ml…64.00100925
51004Chocolate 200 g…7.5010115
……………
111010Travel adapter…19.90
1 · What am I looking for? (H2)2 · Where do I look? (A2:A11)3 · What do I want back? (D2:D11)The formula goes here (J2)

Practice data to copy

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

Master datapaste into cell A1
Item noItemCategoryPrice
1001Sunglasses ClassicAccessories89.00
1002Travel pillowTravel24.90
1003Perfume 50 mlFragrance64.00
1004Chocolate 200 gConfectionery7.50
1005HeadphonesElectronics129.00
1006Luggage tagTravel9.90
1007Lip balmBeauty12.50
1008Power bankElectronics39.00
1009Pralines 250 gConfectionery18.90
1010Travel adapterTravel19.90
Order listpaste into cell H1
Item noQuantityPrice
100512
100240
100925
10115
10018
100860
1004120

Step by step: how to enter the formula

  1. Click cell J2. This is where the price should appear.
  2. Type =XLOOKUP(Equals sign, function name, opening bracket. Excel now shows a small tooltip with the part that comes next.
  3. Click cell H2 (item number 1005). Excel writes H2 into the formula. Then type a comma ,.
  4. Select A2 to A11: press the mouse on A2, hold, drag down to A11, let go. Press F4 to turn it into $A$2:$A$11. Type a comma.F4 adds the dollar signs. They lock the range when you drag the formula down later.
  5. Select D2 to D11, the prices. Press F4 again.
  6. Type ) and press Enter. J2 now shows 129.00, the price of the headphones.
  7. Copy the formula to all rows: click J2 and double-click the small square at the bottom right of the cell. Excel fills the formula down to row 8.

Done. Your formula looks like this:

What your result looks like

1011 shows #N/A. That is correct: this number is not in the master data. The fix is just below.

Item noQuantityPrice
100512129.00
10024024.90
10092518.90
10115#N/A
1001889.00
10086039.00
10041207.50

Two extras once the basic formula works

Text instead of #N/A

Add a fourth part: the text to show for missing numbers. 1011 then shows “not found”.

Look to the left

Impossible with VLOOKUP, easy with XLOOKUP: look up the name in column B and return the number from column A. Result: 1010.

If it does not work

  • #N/A – the number is not in column A. Often a stray space is the cause.
  • #VALUE! – parts 2 and 3 have different lengths. Both must run from row 2 to row 11.
  • Wrong prices after dragging down – the dollar signs are missing. Click the formula, select the range, press F4.
  • #NAME? – your Excel version does not know XLOOKUP (Excel 2019 or older). Use VLOOKUP there.

Excel formulas your team actually uses

This exercise comes from our advanced Excel training. Your team works with XLOOKUP, pivot tables and charts on their own data, as corporate Excel training on site or live online. The next step: our post Excel dashboard with Copilot.

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 trainings, teams work with real data and leave with templates they use right away.

Deutsche Version: XVERWEIS in Excel ganz einfach erklärt · Next Excel tip: SUMIFS explained simply

XLOOKUP: frequently asked questions

Which Excel versions have XLOOKUP?
Microsoft 365, Excel 2021, Excel 2024 and Excel for the web. Excel 2019 and older do not have it.
What is the difference to VLOOKUP?
VLOOKUP needs a column number and only looks to the right. With XLOOKUP you simply select the lookup column and the result column separately, and the match is exact by default.
Do I select the headers too?
No. Select only the data, from row 2. What matters is that the lookup and result columns start and end in the same row.
Why commas and not semicolons?
English Excel separates the parts of a formula with commas. German Excel uses semicolons.
Is XLOOKUP available in Google Sheets?
Yes, with the same name, and it works the same way.

Microsoft and Excel are trademarks of the Microsoft group of companies; Google Sheets is a trademark of Google LLC. SkillDay is an independent training provider. The practice data is fictitious. For many more XLOOKUP examples, see Leila Gharani at xelplus.com.