VLOOKUP in Numbers: Look Up Values in a Table
The examples use this table.
| A | B | C | |
|---|---|---|---|
| 1 | Product | Price | Qty |
| 2 | Apple | 4 | 10 |
| 3 | Pear | 6 | 5 |
| 4 | Kiwi | 12 | 2 |
| 5 | Grape | 8 | 3 |
VLOOKUP step by step
You search for “Kiwi” in the first column of A2:C5 and want the value from column 2 of the range, which is the price. The 0 at the end means: exact match only.
=VLOOKUP("Kiwi",A2:C5,2,0)Result: 12
The column number
The column number is the position inside the range, counting from the first column of that range. With 3 you get the quantity here.
=VLOOKUP("Kiwi",A2:C5,3,0)Result: 2
When the value does not exist
If the search value is not in the table, VLOOKUP returns an error. With IFERROR you show your own text instead.
=IFERROR(VLOOKUP("Mango",A2:C5,2,0),"Not found")Result: Not found
INDEX and MATCH as an alternative
MATCH returns the position of a value in a list and INDEX fetches the value at a position. Together they also work when the lookup column is not the first one.
=INDEX(B2:B5,MATCH("Pear",A2:A5,0))Result: 6
Frequently asked questions
Why does VLOOKUP return an error?
Usually the search value is not in the first column of the range, or it is spelled differently. Use IFERROR to show your own text.
What is the column number in VLOOKUP?
The position of the column within the range, counted from the first column of the range.
VLOOKUP or INDEX and MATCH?
VLOOKUP is shorter. INDEX and MATCH is more flexible because the lookup column does not have to be the first one.
Functions in this article
Practise it yourself
Type the formula yourself in a real exercise and see right away if your answer is correct. The first exercises are free.
Start practising