Cellgrids Cellgrids
Home › Practice questions › XLOOKUP › Question 10

Excel XLOOKUP Practice Question: Using XLOOKUP with a wildcard, find the price of the first product whose name…

By Rinkesh Shah, founder of Cellgrids.

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

ABCD
1ProductPriceDock price
2Basic Mouse300?
3USB Dock Station4500
4Pro Laptop90000
5Webcam HD2800
6Dock Mini1200

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

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found])

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

All practice questions · Excel exercises · Interview prep · Cheat sheet