ExcelUnpackUnpack Excel, one formula at a time.
Log inSign up

Lesson 38 · Lookups

VLOOKUP in Excel

VLOOKUP finds a value in the first column of a table and brings back something from the same row. It is how you turn a product code into a product name or price.

Practice this lesson →Pro lesson. The first 4 lessons are free.

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
  • FALSE for 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.

ABCDEFGHI
1CodeQtyPriceLine totalProductCodeProductPrice
2P-1034P-101Pencil$0.50
3P-10110P-102Eraser$0.75
4P-1052P-103Marker$2.40
5P-1027P-104Ruler$1.20
6P-1043P-105Binder$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?

  1. The last column
  2. The first column
  3. Every column
  4. 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.

VLOOKUP in Excel: how it works, with examples · ExcelUnpack