Cellgrids Cellgrids
Home › Practice questions › XLOOKUP › Question 8

Excel XLOOKUP Practice Question: Using XLOOKUP, find the total cost of the quantity in F2 of the product typed…

By Rinkesh Shah, founder of Cellgrids.

The question

Using XLOOKUP, find the total cost of the quantity in F2 of the product typed in E2 and put it in F4.

The data

ABCDEF
1ProductPriceProductQty
2Pen12Marker12
3Book85
4Bag640Total?
5Marker25
6Folder40

The yellow cell is where your answer goes.

Show answer

Answer in F4: 300

How it works

Explanation: Look up the unit price first, then multiply by the quantity typed in the sheet.
Syntax: =XLOOKUP(E2,A2:A6,B2:B6)*F2
Marker costs 25. 25 x 12 = 300.

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