Free VLOOKUP practice
VLOOKUP practice exercises
VLOOKUP finds a value in the first column of a table and returns the value from a column to its right. 5 reps, from easy to hard, each checked in a real spreadsheet engine. 2 free, 3 with Pro.
=VLOOKUP(lookup_value, table_array, col_index_num, FALSE)
VLOOKUP guide
How to use VLOOKUP in Excel
VLOOKUP finds a value in the first column of a table and returns the value from another column in the same row. It is one of the most common questions in Excel job tests, so it pays to get it exactly right, especially the last argument.
The V stands for vertical: VLOOKUP searches down the first column of the table. It can only return columns to the right of that column. To look up to the left, use XLOOKUP or INDEX with MATCH.
Syntax
=VLOOKUP(lookup_value, table_array, col_index_num, FALSE)
| Argument | What it is |
|---|---|
lookup_value | The value to find, such as a product code. Usually a cell reference, like E2. |
table_array | The table to search. The lookup value must be in its first column. Lock it with $ (press F4) before you fill the formula down. |
col_index_num | Which column of the table to return, counting from 1 at the table's first column, not from column A of the sheet. |
range_lookup | FALSE for an exact match. Leave it out and VLOOKUP does an approximate match, which can return the wrong row without any error. |
Examples
E2. The price is the 3rd column of the table A2:C5.| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Code | Product | Price | Code | Price | |
| 2 | P-101 | Desk | 249 | P-103 | 39 | |
| 3 | P-102 | Chair | 129 | |||
| 4 | P-103 | Lamp | 39 | |||
| 5 | P-104 | Shelf | 89 |
=VLOOKUP(E2,A2:C5,3,FALSE) returns 39.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | From | Grade | Score | Grade | |
| 2 | 0 | F | 73 | B | |
| 3 | 50 | D | |||
| 4 | 60 | C | |||
| 5 | 70 | B | |||
| 6 | 80 | A |
=VLOOKUP(D2,A2:B6,2,TRUE) returns B.
#N/A with something readable.| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Code | Product | Price | Code | Price | |
| 2 | P-101 | Desk | 249 | P-999 | Not found | |
| 3 | P-102 | Chair | 129 | |||
| 4 | P-103 | Lamp | 39 | |||
| 5 | P-104 | Shelf | 89 |
=IFERROR(VLOOKUP(E2,A2:C5,3,FALSE),"Not found") returns Not found.
Common mistakes
Leaving out FALSE
Without FALSE, VLOOKUP does an approximate match. For a code that doesn't exist it quietly returns a nearby row's value instead of an error. Here P-105 isn't in the table, but you get Shelf's price.
Wrong=VLOOKUP("P-105",A2:C5,3) → 89
Right=VLOOKUP("P-105",A2:C5,3,FALSE) → #N/A
The lookup value isn't in the first column
VLOOKUP only searches the first column of table_array. To find a product by name, start the table at the name column, and count the columns from there.
Wrong=VLOOKUP("Lamp",A2:C5,3,FALSE) → #N/A
Right=VLOOKUP("Lamp",B2:C5,2,FALSE) → 39
A column number past the end of the table
col_index_num counts columns inside table_array. The table A2:C5 has 3 columns, so 4 is out of range.
Wrong=VLOOKUP("P-103",A2:C5,4,FALSE) → #REF!
Right=VLOOKUP("P-103",A2:C5,3,FALSE) → 39
VLOOKUP questions
What does FALSE mean in VLOOKUP?
It asks for an exact match. Without it VLOOKUP does an approximate match, which only makes sense for sorted bands such as grade or tax tables. For codes, names and IDs, always end with FALSE (or 0).
Why does my VLOOKUP return #N/A?
The value wasn't found in the first column of the table. Common causes: the value really is missing, there are extra spaces (use TRIM), a number is stored as text, or the table starts at the wrong column.
Can VLOOKUP look to the left?
No. It only returns columns to the right of the first column of the table. Use XLOOKUP or INDEX with MATCH to return a column on the left.
Should I learn VLOOKUP or XLOOKUP?
Both. XLOOKUP is easier and safer, but only works in Excel 365, 2021 and later. VLOOKUP works in every version and still comes up in most Excel tests.
Related functions
Reading is the warm-up
The reps are what make it stick. Try VLOOKUP in the practice sheet above.