VLOOKUP Function
The Excel VLOOKUP function searches the first column of a vertical table and returns a value from another column on the same row. Its match mode should always be specified explicitly.
| Excel VLOOKUP Function | |||||||
| Retrieve a value from a selected column by matching a key in the leftmost column of a vertical table. | |||||||
| Lookup table, editable | VLOOKUP examples | ||||||
| Product Code | Product | Tier | Price | Example / lookup value | Return field | Formula syntax | Result |
| P-100 | Atlas | Core | 1,200 | P-120 | Product | =VLOOKUP(E12,A12:D21,2,FALSE) | Cedar |
| P-110 | Beacon | Plus | 850 | P-160 | Price | =VLOOKUP(E13,A12:D21,4,FALSE) | 1325 |
| P-120 | Cedar | Core | 1,450 | P-140 | Tier | =VLOOKUP(E14,A12:D21,3,FALSE) | Plus |
| P-130 | Delta | Basic | 0 | ||||
| P-140 | Ember | Plus | 1,100 | How to read the examples | |||
| P-150 | Flint | Core | 760 | VLOOKUP searches the first column from top to bottom. | |||
| P-160 | Grove | Plus | 1,325 | FALSE requires an exact key match. | |||
| P-170 | Harbor | Basic | -100 | The column index selects the return field to the right. | |||
| P-180 | Ion | Core | 980 | ||||
| P-190 | Juniper | Plus | 1,500 | ||||
| Reliability checks | |||||||
| P-120 returns the visible product name Cedar | OK | ||||||
| P-160 returns the visible price 1,325 | OK | ||||||
Overview
The Excel VLOOKUP function searches down the first column of a table and retrieves a field from the matching row. It is useful for stable vertical tables, but its leftmost-key rule and approximate-match default require deliberate setup.
Quick reference
Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Returns: A value from the selected return column on the matched row. (any)
Arguments:
lookup_value(required) — The value to find in the first column of table_array.table_array(required) — The vertical table containing the lookup column and return columns.col_index_num(required) — The one-based number of the return column within table_array.range_lookup(optional) — FALSE or 0 requires an exact match; TRUE, 1, or omission uses approximate matching.
The bracketed range_lookup argument is optional and defaults to approximate matching. Use FALSE or 0 for exact matching unless the first column is deliberately sorted for a threshold lookup.
Common uses
- Retrieve a product name, price, category, or tier from a code.
- Assign grades, rates, or bands from ascending threshold tables.
- Enrich one table with fields stored in a vertical reference table.
Calculations
VLOOKUP scans the first column of table_array. After finding a match, it moves across the same row to the column selected by col_index_num. Column 1 is the lookup column, column 2 is the next column to its right, and so on.
With FALSE, the lookup must match exactly and the table does not need to be sorted. With TRUE or an omitted fourth argument, VLOOKUP performs an approximate match and returns the row associated with the largest first-column value less than or equal to the lookup value. Approximate lookup requires the first column to be sorted ascending.
VLOOKUP cannot return a field to the left of the lookup column. It is not case-sensitive, returns the first match when keys are duplicated, and supports * and ? wildcards in exact-match mode.
Function behavior
Situation | Behavior |
|---|---|
Exact match | |
Approximate match | |
Missing exact key | Returns |
Duplicate keys | Returns the first match. |
Text case | Matching is not case-sensitive. |
Wildcards | |
Leftward return | Not supported because return columns must be to the right of the first table column. |
Invalid column index | Returns |
Inserted columns | A hardcoded column index can return a different field if the table structure changes. |
Common errors
Omitting range_lookup
What happens:
VLOOKUP defaults to approximate matching and can return a plausible value for a key that does not exist.
Better approach:
Specify FALSE for identifiers and TRUE only for an intentionally sorted threshold lookup.
Starting table_array after the lookup column
What happens:
VLOOKUP cannot find the key because it searches only the first column of the supplied table.
Better approach:
Make the lookup field the leftmost column of table_array.
Counting worksheet columns instead of table columns
What happens:
The wrong return field is selected or the formula returns #REF!.
Better approach:
Count from the left edge of table_array, where the first column is 1.
Leaving a copied table reference unlocked
What happens:
The lookup table shifts as the formula is filled, causing missing or incorrect results.
Better approach:
Use absolute references or a structured table reference when the lookup table must remain fixed.
Example
Example 1 — Return a Product Name
=VLOOKUP(E12,A12:D21,2,FALSE)
The formula finds product code P-120 in column A and returns Cedar from column 2.
Example 2 — Return a Price
=VLOOKUP(E13,A12:D21,4,FALSE)
P-160 matches one row, and column 4 of the lookup table returns 1,325.
Example 3 — Return a Tier
=VLOOKUP(E14,A12:D21,3,FALSE)
This uses the same table but returns the third-column Tier value Plus for P-140.
Example workbook
The workbook contains a VLOOKUP Example sheet with ten editable Product Code, Product, Tier, and Price records. Three exact-match formulas return a product, price, and tier, while two checks reconcile P-120 and P-160 to the visible table. A Notes sheet explains leftmost keys, column indexes, and match modes.
Key takeaway
For identifier lookups, put the key in the table's first column, count the return column from that boundary, and set exact match explicitly with FALSE.