Office Dễ Hiểu

How to use VLOOKUP for an exact match in Excel

Find a product price by code and keep the lookup range fixed when copying the formula.

VLOOKUP searches the first column of a range. Use FALSE as the last argument to require an exact match.

Visual walkthrough

ExcelF2VLOOKUP

Before

E2 contains VT02. Excel searches A2:A4.

After

The match is A3. C3 returns 220,000.

Check the result

Enter VT03 in E3. F3 should return 85,000.

Try it here

Change the selection to see the result and matching data rows.

=VLOOKUP(E2,$A$2:$C$4,3,FALSE)
CodeItemUnit price
VT01Sand180,000
VT02Gravel220,000
VT03Cement85,000
Result220,000
Code (A)Item (B)Unit price (C)
VT01Sand180000
VT02Gravel220000
VT03Cement85000

If the CSV opens in one column, choose Data → From Text/CSV and select the comma delimiter.

Step-by-step instructions

  1. Enter the sample data in A1:C4. The code column must be the first column of the lookup range.
  2. Type VT02 in E2, then enter the formula below in F2.
    =VLOOKUP(E2,$A$2:$C$4,3,FALSE)
  3. Press Enter to return 220000 from the third column.
  4. Enter VT03 in E3 and copy F2 down to F3. The dollar signs keep A2:C4 fixed, and F3 should return 85000.

Frequently asked questions

Why does VLOOKUP return #N/A?

The code may be missing or may differ because of spaces or a number-versus-text mismatch. Check both the search value and the first source column.

Reference: Microsoft Support