About this exercise
A 125-row dataset on 2 sheets, 2 answer cells, about 6 minutes. Graded in your browser: the value and the formula behind it, with feedback that names the fix.
How to solve it
- Orders!F2
=XLOOKUP(C2,Products!$A$2:$A$26,Products!$E$2:$E$26) - Orders!I2
=XLOOKUP(H2,Products!$A$2:$A$26,Products!$B$2:$B$26,"Not found")
XLOOKUP(lookup_value, lookup_array, return_array) searches one column and returns the matching cell of another column — the return column is a range you select, not a number you count. That is why inserting the Supplier column did not break anything here: the formula still points at column E. The default match mode is exact, so there is no FALSE to remember, and the optional 4th argument replaces #N/A with your own text when the SKU is missing.
VLOOKUP vs XLOOKUP in one line each: VLOOKUP needs the key in the first column and counts columns to the right; XLOOKUP looks up any column and returns any other, left or right. VLOOKUP defaults to approximate match (TRUE) and silently returns wrong rows on unsorted data; XLOOKUP defaults to exact match. VLOOKUP needs IFERROR for missing keys; XLOOKUP has if_not_found built in. XLOOKUP also searches from the bottom (search_mode −1) and can return a whole row (return_array with several columns spills across). Pitfall 1: lookup_array and return_array must have the same number of rows, otherwise #VALUE!. Pitfall 2: XLOOKUP exists only in Excel 365 and 2021 — a file sent to Excel 2019 shows #NAME?, so keep VLOOKUP or INDEX/MATCH for mixed-version teams. Pitfall 3: the broken VLOOKUP is a real-world failure mode worth remembering — a hard-coded column number is a bet that nobody ever inserts a column.
Other ways that work
- =XLOOKUP(C2,Products!$A$2:$A$26,Products!$E$2:$E$26,"Not found",0) — explicit exact match mode (0) and a fallback for the price column too
- =XLOOKUP(C2,Products!A:A,Products!E:E) — whole-column references; fine on a sheet that holds only the catalogue
- =INDEX(Products!$E$2:$E$26,MATCH(C2,Products!$A$2:$A$26,0)) — the pre-365 equivalent (not accepted here: this task practices XLOOKUP)
Common mistakes
Carrying the VLOOKUP habit over: =XLOOKUP(C2,Products!$A$2:$E$26,5) — XLOOKUP has no column number; the second argument must be the single SKU column and the third the single price column.
How we grade
Any formula that produces the right result is accepted, unless the task names a function: then another function earns half credit. We compare values with a small tolerance and ignore case and spaces in text. A correct number typed by hand instead of a formula earns half credit. Multi-cell tasks earn full credit at 100% of cells, half credit from 50%. Where it matters, we also change an input cell on a copy of your sheet and check that your formula follows.
Answers computed with Excel 365 rules and checked in our grading engine on November 16, 2026. Author: GridBelt team.