VLOOKUP with an exact match
Find a value in the first column of a table and return a value from another column in the same row.
The formula
Excel and Google Sheets
=VLOOKUP(A2, Products!$A$2:$C$100, 3, FALSE)How it works
A2The value to look for, here a product code.
Products!$A$2:$C$100The table to search. The code must be in its first column. $ signs keep the range fixed when you fill down.
3Return the value from the 3rd column of the table (the price).
FALSEExact match only. Without it, VLOOKUP guesses and can return the wrong row.
Example
| A: Code | B: Qty | C: Result (price) |
|---|---|---|
| P-101 | 4 | 12.50 |
| P-205 | 1 | 89.00 |
| P-999 | 2 | #N/A |
Tips
- #N/A means the code was not found. Check for extra spaces or numbers stored as text.
- VLOOKUP cannot look to the left. Use XLOOKUP or INDEX/MATCH when the return column is before the lookup column.