Excel XLOOKUP Practice Question: Using XLOOKUP with a wildcard, find the price of the first product whose name…
The question
Using XLOOKUP with a wildcard, find the price of the first product whose name contains Dock and put it in D2.
The data
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Product | Price | Dock price | |
| 2 | Basic Mouse | 300 | ? | |
| 3 | USB Dock Station | 4500 | ||
| 4 | Pro Laptop | 90000 | ||
| 5 | Webcam HD | 2800 | ||
| 6 | Dock Mini | 1200 |
The yellow cell is where your answer goes.
Show answer
Answer in D2: 4500
How it works
Explanation: Match mode 2 turns on wildcards. "*Dock*" matches any name that has Dock anywhere in it, and XLOOKUP returns the first match.
Syntax: =XLOOKUP("*Dock*",A2:A6,B2:B6,"",2)
USB Dock Station is the first name containing Dock. Its price is 4500. Dock Mini comes later.
Try it yourself in the live sheet
Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.
Try this question in the live sheet →XLOOKUP syntax
The modern replacement for VLOOKUP — searches any column and returns from any other, no column counting needed. XLOOKUP is used to pull matching data from one part of a workbook into another. Full XLOOKUP guide.
More XLOOKUP practice questions
- Using XLOOKUP, find the price of the SKU typed in E2 and put it in F2.
- Find the name of the employee whose ID is typed in E2 and put it in F2.
- Using XLOOKUP, find the roll number of the student named in E2 and put it in F2. The…
- The code in D2 is not in the list. Make the formula show Not listed instead of an error…
- Using XLOOKUP, find the latest (last) amount paid by the customer typed in D2 and put it…
- Using XLOOKUP with an approximate match, find the commission rate for each rep from the…
- What share of total sales does the region typed in D2 have? Give it as a decimal and put…
- Using XLOOKUP, find the total cost of the quantity in F2 of the product typed in E2 and…
All practice questions · Excel exercises · Interview prep · Cheat sheet