What you will learn
- Look something up in a table
- Pick which column has the answer
- Find an exact match
How it works
VLOOKUP has four parts:
- what to find (a code)
- the table to search
- which column has the answer
FALSEfor an exact match
Lock the table with $ so it doesn't move when you copy.
Formulas at a glance
=VLOOKUP(value, table, col_num, FALSE) | The pattern to follow |
=VLOOKUP(A2,$G$2:$I$6,3,FALSE) | Price is column 3 |
Example
Write the formula to look up the price for code P-103 (A2) in the table on the right.
| A | B | C | D | E | F | G | H | I | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Code | Qty | Price | Line total | Product | Code | Product | Price | |
| 2 | P-103 | 4 | P-101 | Pencil | $0.50 | ||||
| 3 | P-101 | 10 | P-102 | Eraser | $0.75 | ||||
| 4 | P-105 | 2 | P-103 | Marker | $2.40 | ||||
| 5 | P-102 | 7 | P-104 | Ruler | $1.20 | ||||
| 6 | P-104 | 3 | P-105 | Binder | $4.95 |
Click C2 and type =VLOOKUP(A2,$G$2:$I$6,3,FALSE), then press Enter.
The answer is $2.40.
When to use it
- Getting a price or name from a code
- Pulling details from a second table
- Matching IDs between two lists
Common mistakes
- Leaving out FALSEWithout FALSE, VLOOKUP may return a wrong near match.
- Counting the column number wrongCount from the table’s first column, starting at 1.
- Not locking the tableLock it with $ before you copy the formula down.
Quick check
Which column does VLOOKUP search?
- The last column
- The first column
- Every column
- The column you pick
Show the answer
B. The first column It always searches the first column of the table.
Practice it on a real sheet
Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.