Look up a price with VLOOKUP
Step 1 of 3
VLOOKUP finds a value in the first column of a table and returns something from the same row. It takes four things: what to look for, the table, which column to return and how to match.
Click Continue when you're ready.
Already know it? Type the formula straight into G2.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Code | Product | Price | Code | Price | |||
| 2 | A10 | Pen | 12 | C30 | ||||
| 3 | B20 | Notebook | 35 | |||||
| 4 | C30 | Stapler | 89 | |||||
| 5 | D40 | Folder | 24 | |||||
| 6 | ||||||||
| 7 | ||||||||
| 8 |
Need help?
Why this works
VLOOKUP looks down the first column of A2:C5 until it finds C30, then returns the value in the 3rd column of that row. The column number counts from the left edge of the table, not from column A of the sheet.
Common mistake: Leaving out FALSE. VLOOKUP then does an approximate match and can return the wrong row without showing an error.
The answer
- G2
=VLOOKUP(1F2,2A2:C5,33,4FALSE)
In plain words: Find 1the code in F2 in the first column of 2A2:C5 and return 3the third column, the price, 4only on an exact match.
+15 points