Looking up values with XLOOKUP or VLOOKUP
A lookup function that finds a key in one column and returns the matching value from another column, such as a price for a product code. It can show a message if no match is found.
Understanding Looking up values with XLOOKUP or VLOOKUP in VCE Spreadsheets, SQL & Visualisation
What it does: The fourth argument of XLOOKUP is the text shown when there is no match, instead of an error. FALSE as the last argument makes VLOOKUP match exactly, so a similar code will not be returned by mistake. The lookup key (E2) comes first, then the column to search (A2:A20), then the return column (C2:C20) that holds the price. In VLOOKUP, the number is the column index. It says which column of the table to return a value from. The 'not found' message is the fourth argument, after the return column. Putting it in the third position would make it the return range.
Common mistakes: The lookup array and the return array are swapped. The key P101 is searched for in the Price column, so nothing matches. It should search A2:A6 (codes) and return B2:B6 (prices). The table A2:B6 only has two columns, so column 3 does not exist and gives a #REF! error. The return column number should be 2 to get the price.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 4–20) and word search (Modules 4–34).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
XLOOKUPFill in the Blanks
Spot the Error
Student with a class code? Join your class →