Excel XLOOKUP Practice Question: Using XLOOKUP, find the total cost of the quantity in F2 of the product typed…
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
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Product | Price | Product | Qty | ||
| 2 | Pen | 12 | Marker | 12 | ||
| 3 | Book | 85 | ||||
| 4 | Bag | 640 | Total | ? | ||
| 5 | Marker | 25 | ||||
| 6 | Folder | 40 |
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
- 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…
- Find the name of the student with the highest score and put it in D2.
All practice questions · Excel exercises · Interview prep · Cheat sheet