How to Use VLOOKUP in Excel: a beginner’s walkthrough

By Srini Vanamala / September 29, 2026 / Formulas & Functions
How to Use VLOOKUP in Excel: a beginner's walkthrough

This is VLOOKUP from zero, in a blank sheet, one piece at a time. Do it as you read.

Step 1: build the lookup table

On Sheet1, type:

A B
1 Code Product
2 P01 Pen
3 P02 Book
4 P03 Bag

The thing you will search for (the code) must be in the first column.

Step 2: the cell to fill

In D1 type Code, D2 type P02. In E1 type Product. E2 is where the formula goes.

Step 3: write the formula piece by piece

Click E2 and type, in this order:

  1. =VLOOKUP(
  2. D2, — what to find
  3. A:B, — where to look (both columns)
  4. 2, — return the 2nd column of that range
  5. FALSE) — exact match only
=VLOOKUP(D2, A:B, 2, FALSE)

Press Enter. E2 shows Book.

Step 4: copy it down

Type more codes in D3, D4. Drag E2’s fill handle down. Each row looks up its own code.

Step 5: fix #N/A

Type P09 in D5. E5 shows #N/A — there is no P09. That is correct. To show something friendlier:

=IFERROR(VLOOKUP(D2, A:B, 2, FALSE), "Not found")

Check it worked

Change B3 from Book to Notebook. E2 changes too — the lookup is live.

Next

Newer Excel has an easier version: XLOOKUP. The full VLOOKUP reference: VLOOKUP in Excel.

← →
Srini Vanamala

20 years with spreadsheets and enterprise systems. Writes one short, plain-English Excel lesson a day. Got an Excel question? learnexceleasycom@gmail.com

Have a question about this lesson?

Ask anything — I read every comment. Your email is never shown.