Use VLOOKUP when you need to find a value in the leftmost column of a table and return a corresponding value from a column to the right, and your data is arranged vertically. It is the right tool for simple exact-match lookups in Excel 2019 and earlier; for newer versions, XLOOKUP is often better, but VLOOKUP remains essential for legacy workbooks and when you specifically need approximate-match behavior.
What VLOOKUP Actually Does
VLOOKUP stands for “vertical lookup.” It searches for a key (like a product ID or employee name) in the first column of a table and returns a value from a specified column in the same row. The syntax is:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
- lookup_value – what you are searching for (e.g., a cell reference like
A2or a text string in quotes). - table_array – the range that contains the data, with the lookup column as the first column (e.g.,
B2:E100). - col_index_num – the column number in the table from which to return a value (1 for the first column, 2 for the second, etc.).
- range_lookup –
FALSEfor exact match,TRUE(or omitted) for approximate match. Always useFALSEunless you specifically need approximate matching.
Key Scenarios Where VLOOKUP Shines
Use VLOOKUP in these common situations:
- Joining data from two tables – e.g., adding department names to a list of employee IDs by looking up the ID in a separate department table.
- Pulling a single value from a lookup table – e.g., retrieving a product price from a price list based on a product code.
- Approximate matching for ranges – e.g., assigning a tax rate based on income brackets, where the lookup column contains lower bounds and
TRUEfinds the largest value less than or equal to the lookup value. - Working with legacy workbooks – if you open an older Excel file that already uses VLOOKUP, you need to understand it to edit or debug it.
How to Choose Between VLOOKUP and XLOOKUP
If you are using Excel 2021 or Microsoft 365, XLOOKUP is generally the better choice because it is more flexible and easier to use. However, VLOOKUP is still the right tool in these cases:
- You are sharing the file with someone using Excel 2016 or 2019, where XLOOKUP is not available.
- You need approximate match behavior that is simpler to set up with VLOOKUP’s
TRUEoption (XLOOKUP requires a separatematch_modeargument). - You are maintaining an existing VLOOKUP formula and do not want to rewrite it.
For new workbooks in Excel 365, prefer XLOOKUP because it can look to the left, return multiple values, and handle missing keys gracefully. But if you must keep compatibility, VLOOKUP is the safe choice.
Common VLOOKUP Mistakes and How to Avoid Them
Several errors trip up VLOOKUP users:
- #N/A error – This appears when the lookup value is not found. Check for extra spaces, text numbers vs. real numbers, or that the lookup column truly contains the value.
- Wrong column index – If you count columns incorrectly, you get the wrong result. Always count from the first column of the table array, not from column A of the sheet.
- Using approximate match by mistake – Omitting the fourth argument defaults to
TRUE, which can return incorrect results if your lookup column is not sorted. Always specifyFALSEfor exact matches. - Lookup column not on the left – VLOOKUP cannot look to the left. If your key is to the right of the value you need, use INDEX/MATCH or XLOOKUP instead.
- Copying formulas with relative ranges – If you drag a VLOOKUP formula down, the table array may shift. Use absolute references like
$B$2:$E$100to lock the range.
VLOOKUP vs. INDEX/MATCH vs. XLOOKUP
Here is a quick comparison to help you decide:
- VLOOKUP – Simple, but limited to looking right, requires the key in the first column, and breaks if columns are inserted or deleted.
- INDEX/MATCH – More flexible: can look left, does not break with column inserts, and is faster on large datasets. Syntax:
=INDEX(return_range, MATCH(lookup_value, lookup_range, 0)). - XLOOKUP – The modern replacement: can look left, return multiple values, specify match mode, and has a built-in not-found message. Syntax:
=XLOOKUP(lookup_value, lookup_range, return_range).
For most new workbooks, XLOOKUP is the best. But if you need to support older Excel versions, INDEX/MATCH is a strong alternative that works everywhere.
Concrete Example: Employee Department Lookup
Suppose you have a list of employee IDs in column A (A2:A10) and you want to add their department names from a table in columns D and E (D2:E6) where D contains IDs and E contains departments. In cell B2, enter:
=VLOOKUP(A2, $D$2:$E$6, 2, FALSE)
Drag the formula down to B10. If A2 contains “E101” and the department table has “E101” in D2 and “Sales” in E2, the formula returns “Sales”. The FALSE ensures an exact match, so if an ID is missing, you get #N/A instead of a wrong department.
Approximate Match Example: Tax Brackets
VLOOKUP’s approximate match is useful for tiered rates. Suppose you have a table in A1:B5 with income thresholds (0, 10000, 20000, 30000) in column A and tax rates (0.10, 0.15, 0.20, 0.25) in column B. To find the rate for an income in cell D2, use:
=VLOOKUP(D2, $A$1:$B$5, 2, TRUE)
If D2 is 15000, VLOOKUP finds the largest value in A that is less than or equal to 15000, which is 10000, and returns 0.15. The table must be sorted ascending by column A for this to work correctly.
Frequently Asked Questions
Why is my VLOOKUP returning #N/A even though the value exists?
This usually happens because of a data type mismatch. For example, the lookup value might be a number stored as text (e.g., “123” instead of 123) or vice versa. Check for leading/trailing spaces, or use the TRIM function on the lookup column. Also confirm that the lookup value is in the first column of the table array.
Can VLOOKUP look to the left?
No. VLOOKUP can only return values from columns to the right of the lookup column. If you need to look to the left, use INDEX/MATCH or XLOOKUP.
What is the difference between approximate and exact match in VLOOKUP?
Exact match (FALSE) finds the first row where the lookup value equals the key. Approximate match (TRUE) finds the largest key that is less than or equal to the lookup value, assuming the lookup column is sorted ascending. Use exact match for IDs and names; use approximate match for ranges like tax brackets.
Does VLOOKUP work if my data has duplicate lookup values?
VLOOKUP returns the first match it finds. If there are duplicates, you will only get the first occurrence. To get all matches, you need to use FILTER (in Excel 365) or a different approach.
Is VLOOKUP case-sensitive?
No. VLOOKUP is not case-sensitive by default, so “ABC” and “abc” are treated as equal. If you need case-sensitive matching, use EXACT with INDEX/MATCH or XLOOKUP’s match mode.
Can I use VLOOKUP to return a value from a different sheet?
Yes. Just reference the sheet in the table array, like =VLOOKUP(A2, Sheet2!$A$1:$B$100, 2, FALSE). The sheet name is followed by an exclamation mark.
Final Thoughts
VLOOKUP is a reliable, widely understood function that is still useful in many situations, especially for compatibility with older Excel versions. For new workbooks, consider XLOOKUP for its flexibility, but do not discard VLOOKUP—it remains a core skill for anyone working with spreadsheets. Always test your formulas with a small sample to ensure the column index and match type are correct.
Related
- C Battery Diameter: Exact Size and What It Means
- Data Entry Software for Smart Grids: A Practical Guide
- Shortcut to Close All Tabs? Quick Keys & Steps
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Balance of Payments Equation: Formula and Key TermsThe balance of payments equation records a country’s transactions with the rest of the world: current account +…
- XLOOKUP in Excel: Syntax, Examples, and TipsXLOOKUP is an Excel function that searches one range for a value and returns the corresponding value from…
- Excel AND Function: Why It Does Not Return an ArrayExcel’s AND function returns one value, either TRUE or FALSE; it does not return a separate result for…
- Using ROUNDUP in Excel: 10 Practical Formula ExamplesTo round a number up in Excel, use ROUNDUP with the number and the number of digits to…
- Excel SUBTOTAL for Columns: Formulas, Filters, and TipsTo subtotal a column in Excel, enter a formula such as =SUBTOTAL(9,B2:B20) in a cell below the values;…
- SUMIF Excel: Sum Cells Containing Specific TextTo sum values when a related cell contains particular text, use SUMIF with asterisks as wildcards. With descriptions…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.