VLOOKUP searches the first column of a range. Use FALSE as the last argument to require an exact match.
Visual walkthrough
Before
E2 contains VT02. Excel searches A2:A4.
After
The match is A3. C3 returns 220,000.
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)| Code | Item | Unit price |
|---|---|---|
| VT01 | Sand | 180,000 |
| VT02 | Gravel | 220,000 |
| VT03 | Cement | 85,000 |
Sample data
Download sample CSV| Code (A) | Item (B) | Unit price (C) |
|---|---|---|
| VT01 | Sand | 180000 |
| VT02 | Gravel | 220000 |
| VT03 | Cement | 85000 |
If the CSV opens in one column, choose Data → From Text/CSV and select the comma delimiter.
Step-by-step instructions
- Enter the sample data in A1:C4. The code column must be the first column of the lookup range.
- Type VT02 in E2, then enter the formula below in F2.
=VLOOKUP(E2,$A$2:$C$4,3,FALSE) - Press Enter to return 220000 from the third column.
- 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