Skip to content

Excel function guide · Lookup

VLOOKUP function in Excel

VLOOKUP looks for a value in the first column of a table and returns the value from another column on the same row, chosen by its number. Add FALSE as the last argument to require an exact match.

Syntax

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

VLOOKUP works in every version of Excel. In Microsoft 365 and Excel 2021 or later, XLOOKUP does the same job with fewer pitfalls.

ArgumentRequired?What it means
lookup_valueRequiredThe value to find in the first column of the table.
table_arrayRequiredThe whole table, starting with the column you search in.
col_index_numRequiredWhich column of the table to return: 1 is the first column of table_array, 2 the next, and so on.
range_lookupOptionalFALSE (or 0) for an exact match. TRUE or left out means approximate match, which needs the first column sorted ascending.

VLOOKUP examples

Every example uses this small table. The results are what Excel shows in the cell.

ABCD
1SKUProductCategoryPrice
2P-318Monitor armAccessories85
3P-110Desk lampLighting39
4P-517WebcamElectronics65
5P-205Office chairFurniture240
6P-402Standing deskFurniture520
  1. 1. Price of a product

    =VLOOKUP("P-205", A2:D6, 4, FALSE)

    Result: 240

    VLOOKUP finds P-205 in column A of the table and returns the 4th column of the table, Price.

  2. 2. Name of a product

    =VLOOKUP("P-517", A2:D6, 2, FALSE)

    Result: Webcam

    Same lookup, column 2. The column number counts from the first column of table_array, not from column A of the sheet.

  3. 3. A code that isn't there

    =VLOOKUP("P-300", A2:D6, 4, FALSE)

    Result: #N/A

    With FALSE, a missing code gives #N/A, which is honest. Wrap it in IFERROR or IFNA to show a message instead.

Try it now

Practise VLOOKUP in a live sheet.

Type each formula yourself. Answers are checked by the same engine as the full course. No account needed.

Try it · VLOOKUP
0 XP
F3
A
B
C
D
E
F
1
SKU
Product
Category
Price
Lookup
Answer
2
P-318
Monitor arm
Accessories
85
SKU
P-205
3
P-110
Desk lamp
Lighting
39
Product
4
P-517
Webcam
Electronics
65
Price
5
P-205
Office chair
Furniture
240
SKU
P-517
6
P-402
Standing desk
Furniture
520
Category
7
8
Double-click or start typing to edit

Step 1 of 3

In F3, return the product name for the SKU in F2 with VLOOKUP. The list isn't sorted, so ask for an exact match.

Common VLOOKUP mistakes

Practise this in Excel Quest

VLOOKUP (and why FALSE matters) Members

Course 6 · Lookups & Relationships · 12 min

Price an order list from a product catalog with VLOOKUP, fix an approximate-match bug and learn its limits.

This lesson is included in Formula Quest memberships. A free account starts you on the free lessons of the Excel Quest curriculum.

Related functions

All Excel function guides