The core rules of VLOOKUP are: it searches for a value in the first column of a table, then returns a value from a column you specify to the right; the lookup value must be in the first column, the table must be sorted only if you use approximate match, and the column index number must be positive and within the table width. VLOOKUP works only for left-to-right lookups, returns the first match only, and requires an exact match unless you deliberately set range_lookup to TRUE.
What VLOOKUP Does and Its Basic Syntax
VLOOKUP stands for “vertical lookup.” It is a function in Excel that searches down the first column of a specified range for a key value, then retrieves a corresponding value from a cell to the right in the same row. The syntax is:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
- lookup_value – the value you want to find (text, number, or cell reference).
- table_array – the range that contains the lookup column and the return column. The lookup column must be the leftmost column of this range.
- col_index_num – the column number in the table_array from which to return a value. Column 1 is the first column of the range, column 2 is the second, and so on.
- range_lookup – optional. Use
FALSEfor an exact match, orTRUE(or omit) for an approximate match. The default is TRUE, which requires the first column to be sorted ascending.
Rule 1: The Lookup Value Must Be in the First Column
VLOOKUP can only search the leftmost column of the table_array. If your key column is not the first column, VLOOKUP will return an error or a wrong result. For example, if you have a table with Product ID in column B and Product Name in column A, you cannot use VLOOKUP to find a Product ID and return the Name because the ID is not in the first column. Workarounds include rearranging columns, using INDEX/MATCH, or using XLOOKUP (available in Excel 2021 and Microsoft 365).
Rule 2: It Returns Only the First Match
VLOOKUP stops at the first occurrence of the lookup value in the first column. If duplicates exist, you only get the value from the first matching row. This is a common source of errors when users expect the last match or a sum of all matches. For example, if “Apple” appears in rows 2 and 5, VLOOKUP will always return the value from row 2. To handle duplicates, you might need to use other functions like FILTER (Excel 365) or an array formula.
Rule 3: Column Index Number Must Be Positive and Within Range
The col_index_num must be a positive integer. If you enter 0, VLOOKUP returns a #VALUE! error. If you enter a number greater than the number of columns in table_array, you get a #REF! error. For instance, if your table covers A:C (3 columns) and you ask for column 4, you get #REF!. Always count columns from the leftmost column of the table_array, not from the worksheet’s column A.
Rule 4: Exact vs. Approximate Match
The fourth argument controls matching behavior:
- FALSE – requires an exact match. If not found, returns #N/A. This is what you should use for IDs, names, and most lookups.
- TRUE or omitted – finds the largest value that is less than or equal to the lookup value. This requires the first column to be sorted in ascending order. If not sorted, results are unpredictable. Use this only for ranges like tax brackets or discount tiers.
Example of exact match: =VLOOKUP("Bolt", A2:B10, 2, FALSE)
Example of approximate match (with A2:A10 sorted): =VLOOKUP(75000, A2:B10, 2, TRUE) returns the value for the largest bracket ≤ 75000.
Rule 5: VLOOKUP Works Only Left-to-Right
Because the lookup column must be the first column, VLOOKUP cannot return a value that is to the left of the lookup column. If you need to fetch data from a column to the left, you must restructure your table or use INDEX/MATCH. For example, to look up a name and return an ID that is to the left, you cannot do it with VLOOKUP directly.
Common Errors and How to Fix Them
- #N/A – Value not found (exact match) or no approximate match. Check for extra spaces, text vs. number formatting, or unsorted data for approximate match.
- #REF! – col_index_num is greater than the table width. Expand table_array or lower the index.
- #VALUE! – col_index_num is 0 or non-numeric. Ensure it is a positive number.
- #NAME? – Misspelled function name or missing quotes around text lookup values.
- Incorrect results – Often due to approximate match on unsorted data. Use FALSE or sort the first column.
VLOOKUP vs. INDEX/MATCH vs. XLOOKUP
INDEX/MATCH is a flexible alternative that allows lookups in any direction and does not require the lookup column to be first. It is slightly more complex but works in all Excel versions. XLOOKUP, introduced in Excel 2021 and Microsoft 365, is the modern replacement: it can search left or right, handle exact or approximate matches, and return multiple values. For new workbooks, XLOOKUP is recommended. Example of INDEX/MATCH: =INDEX(C2:C10, MATCH("Bolt", A2:A10, 0)) returns the value from C for the row where A equals “Bolt”.
Frequently Asked Questions
Why is my VLOOKUP returning #N/A even though the value exists?
Check for invisible characters like extra spaces, or that the lookup value and the table values are the same data type (text vs. number). Use the TRIM function to clean data, or format both as text. Also ensure you are using FALSE for exact match.
Can VLOOKUP return multiple matches?
No, VLOOKUP returns only the first match. To get all matches, use the FILTER function (Excel 365) or an array formula with IF and SMALL. For example, =FILTER(B2:B10, A2:A10="Apple") returns all values for “Apple”.
Does VLOOKUP work with wildcards?
Yes, with exact match you can use wildcards in the lookup_value: * for any sequence, ? for a single character. For example, =VLOOKUP("A*", A2:B10, 2, FALSE) finds the first value starting with “A”.
What is the difference between VLOOKUP and HLOOKUP?
VLOOKUP searches vertically down the first column, while HLOOKUP searches horizontally across the first row. HLOOKUP is rarely used because tables are usually organized vertically.
Why does VLOOKUP return the wrong value when I omit the last argument?
Omitting the last argument defaults to TRUE (approximate match). If your first column is not sorted, you get incorrect results. Always use FALSE for exact matches unless you intentionally need approximate.
Can I use VLOOKUP to sum values from multiple rows?
No, VLOOKUP returns a single value. To sum all matches, use SUMIF or SUMIFS. For example, =SUMIF(A2:A10, "Apple", B2:B10) sums all sales for “Apple”.
Related
- Project Slab Pond Table: Build & Design Guide
- How to Make Random Numbers in C++
- Computer Shortcut Keys to Shut Down Windows
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Hide Duplicate Rows in Excel with a Filter Step by StepTo hide exact duplicate rows in Excel without deleting them, select the full data range, then choose Data…
- Inventory Spreadsheet Software: How to Choose the Right ToolInventory spreadsheet software is a spreadsheet app—such as Microsoft Excel or Google Sheets—used to record stock, movements, locations,…
- How to Copy Formula Data in Excel Without Breaking ReferencesTo copy formula data in Excel, select the cells, press Ctrl+C, choose the destination, and use Home >…
- Rank in Excel With Ties: RANK.EQ and Unique RanksTo give equal values the same rank in Excel, enter a RANK.EQ formula. With scores in B2:B6, put…
- Excel SUMIF Starts With Text: Formula & ExamplesYes, you can use SUMIF to sum values where a corresponding text cell starts with specific characters, by…
- Excel LET and LAMBDA: How They Work Together in FormulasExcel’s LET function assigns names to values inside a formula, while LAMBDA lets you create a reusable function…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.