Return stock for the selected SKU
How many units of SKU-22 are in stock?
Formula: =VLOOKUP(E2,A2:D5,4,FALSE) → 75
Practice VLOOKUP in a live spreadsheet with exact and approximate matches, missing-value handling, and guided lookup exercises with answers.
VLOOKUP is still common in inherited workbooks, exports, and interview exercises. Its logic is compact: search the first column of a table and return a value from a numbered column to the right. The live spreadsheet below looks up a catalog price by ID. Change the ID, the return-column number, or the final match argument and watch what changes.
Good VLOOKUP practice must include the failure modes. An omitted match argument can produce a plausible but wrong result. A table that shifts can break a hard-coded column number. A key stored as text will not necessarily match a numeric key that looks identical. The related exercises cover exact matches, ordered range lookups, error handling, cross-sheet tables, and alternatives such as XLOOKUP and INDEX with MATCH.
Work from a known key before trying a missing one. Confirm that the lookup column is the leftmost column of the selected table, count the return column from that same boundary, and lock ranges before copying the formula. Once you can explain those checks, you are ready to compare VLOOKUP with newer lookup patterns and choose based on the workbook you actually have.
Your turn: in F2, use an exact VLOOKUP to return the price for the SKU in E2.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | SKU | Item | Price | Stock | Find SKU | |
| 2 | SKU-11 | Notebook | 6 | 40 | SKU-22 | |
| 3 | SKU-22 | Marker | 3 | 75 | ||
| 4 | SKU-33 | Folder | 5 | 28 | ||
| 5 | SKU-44 | Tape | 4 | 52 |
Answer: =VLOOKUP(E2,A2:D5,3,FALSE)
Open a task in its lesson.
Try the spreadsheet first, then compare your formula and result.
How many units of SKU-22 are in stock?
Formula: =VLOOKUP(E2,A2:D5,4,FALSE) → 75
What should the sheet show when SKU-99 is absent?
Formula: =IFERROR(VLOOKUP("SKU-99",A2:D5,2,FALSE),"Not found") → Not found
The usual cause is approximate matching when exact matching was intended. Use FALSE for IDs and verify that key types match.
Not directly. Reorder the source table or use XLOOKUP or INDEX with MATCH when the return column is left of the key.
It suits ordered thresholds such as tax, discount, or grade bands. The threshold column must be sorted and tested at boundaries.
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page