VLOOKUP
Search for a value in the first column of a table and retrieve data from another column in the same row.
Spreadsheet editor
Spreadsheet editor
Syntax
=VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)
Returns: Varies Arguments
| Argument | Required | Description |
|---|---|---|
| lookup_value | Yes | The value to search for in the first column of the range. |
| table_array | Yes | The table of data in which to search for the lookup value. |
| col_index_num | Yes | The column number in the table from which to retrieve the value. |
| range_lookup | No | If TRUE or omitted, it finds an approximate match. If FALSE, it looks for an exact match. |
About
The function works in exact or approximate match mode. Exact matching (FALSE for the last parameter) is most common and safest for finding specific values. Approximate matching (TRUE) requires your data to be sorted and returns the closest match, useful for tax brackets or shipping rates.
For more flexible lookups, check out XLOOKUP, which can search any column and returns arrays. You can also combine INDEX with MATCH for more control over your lookups. If your data is organized horizontally instead of vertically, use HLOOKUP.
Examples
Product lookup with exact text matching
Spreadsheet editor
Column index errors
Spreadsheet editor
Tax brackets with approximate match
Spreadsheet editor
Watch out for
Lookup value not in first column
VLOOKUP can only search the leftmost column of your table. If your lookup value is in column B and you want to return from column A, VLOOKUP won't work.
→ Rearrange your data so the lookup column is first, or use XLOOKUP which can search any column and return from any direction.
Wrong column number
Column numbers start at 1 for the first column in your range, not the spreadsheet column. Using the wrong number returns data from the wrong column or causes a #REF! error.
→ Count columns within your table_array range starting at 1. If your range is C2:F100, column C is 1, D is 2, E is 3, and F is 4.
#N/A errors from extra spaces
Lookup values fail when there are extra spaces before or after text, even though the values look identical.
→ Use TRIM on your lookup value or source data to remove extra spaces. Or wrap your lookup value: =VLOOKUP(TRIM(A2), table, 2, FALSE).
Approximate match with unsorted data
Using TRUE for range_lookup on unsorted data returns incorrect results without warning.
→ Either sort your data in ascending order by the first column, or use FALSE for exact matching. Most lookups should use FALSE unless you specifically need approximate matching for ranges.
Tips & notes
Common questions
Should I use VLOOKUP or XLOOKUP?
Why does VLOOKUP return #N/A?
Can VLOOKUP look up values to the left?
When should I use TRUE vs FALSE for range_lookup?
Practice this function
Lookup error handling
BeginnerHandle missing lookups with IFNA for VLOOKUP and the not_found argument in XLOOKUP.
VLOOKUP with approximate match
IntermediateCalculate shipping rate based on package weight using a tiered rate table.
Bank statement reconciliation
AdvancedReconcile a bank statement with internal records, identify missing items.
Full data reconciliation
AdvancedMatch transactions between two systems, flag discrepancies by type.