VLOOKUP is Excel’s classic function for looking up a value in the leftmost column of a table and returning a matching value from a column to the right. For example, with a product ID in cell E2 and a table of products in A2:C10, =VLOOKUP(E2, A2:C10, 2, FALSE) returns the product name. This guide walks you through writing your first VLOOKUP, common pitfalls, and fixes.
What You’ll Need
- Microsoft Excel (365, 2021, 2019, or 2016) on Windows, Mac, or Excel for the web. Steps are identical except where noted.
- A worksheet with two ranges: a lookup value (what you’re searching for) and a table array (the data to search). The lookup value must appear in the first column of that table.
- Basic familiarity with cell references (e.g., A2, $B$2).
Step-by-Step
- Identify your lookup value. Decide which cell contains the value you want to find. For instance, if you’re looking up a product ID, put that ID in a cell, say E2.
- Identify your table array. Select the range that includes both the lookup column (first column) and the column with the result you want. Example: if product IDs are in A2:A10 and product names in B2:B10, your table array is
A2:B10. - Determine the column index number. Count from the first column of your table array: column 1 is the lookup column, column 2 is the next, etc. In the example, product name is in column 2.
- Click the cell for the result. This is where the formula will go, e.g., F2.
- Type the formula. Start with
=VLOOKUP(. Then add the lookup value cell:=VLOOKUP(E2,. - Add the table array. Type the range (or select it with your mouse). Use absolute references (with $) if you plan to copy the formula down:
=VLOOKUP(E2, $A$2:$B$10,. - Add the column index number. Type
2for the second column:=VLOOKUP(E2, $A$2:$B$10, 2,. - Choose exact or approximate match. Type
FALSEfor an exact match (most common) orTRUEfor an approximate match (requires sorted first column). Close the parenthesis:=VLOOKUP(E2, $A$2:$B$10, 2, FALSE). - Press Enter. Excel returns the matching value. If it shows
#N/A, see Troubleshooting below. - Copy the formula down (optional). If you have multiple lookup values in E2:E10, drag the fill handle (bottom-right corner of F2) down. Because you used absolute references, the table array stays fixed while the lookup value changes.
Common Mistakes
- Lookup value not in the first column. VLOOKUP only searches the leftmost column of your table array. If your ID is in column B and names in column A, VLOOKUP won’t work—reorder columns or use INDEX/MATCH.
- Wrong column index number. If you ask for column 3 but your table has only 2 columns, you get
#REF!. Always count from the first column of the table array. - Using TRUE (approximate match) when you need exact. With TRUE, if no exact match exists, VLOOKUP returns the next largest value that is less than the lookup value. This often gives wrong results unless your first column is sorted ascending.
- Forgetting absolute references. If you copy the formula without $, the table array shifts and may return wrong values or errors.
- Extra spaces or text formatting. If the lookup value has trailing spaces or is stored as text (green triangle), VLOOKUP won’t match. Use TRIM and ensure consistent data types.
Tips
- Use FALSE for exact matches unless you genuinely need an approximate match (e.g., tax brackets). It avoids unexpected results.
- Sort for TRUE matches. If you use TRUE, sort the first column of the table array in ascending order (A-Z or smallest to largest).
- Use a named range for the table array (e.g.,
=VLOOKUP(E2, ProductTable, 2, FALSE)). Select the range, go to Formulas > Define Name, and give it a name. This makes formulas easier to read. - Wrap VLOOKUP in IFERROR to hide #N/A:
=IFERROR(VLOOKUP(E2, $A$2:$B$10, 2, FALSE), "Not found"). - Consider XLOOKUP if you have Excel 2021 or Microsoft 365. XLOOKUP can search left, return multiple columns, and handle errors more cleanly:
=XLOOKUP(E2, $A$2:$A$10, $B$2:$B$10).
Troubleshooting
- #N/A error: The lookup value is not found in the first column. Check for typos, extra spaces, or number/text mismatches. Use
=TRIM(E2)to clean spaces, and ensure both are numbers or both are text. - #REF! error: The column index number is larger than the number of columns in the table array. Count your columns again.
- #VALUE! error: The column index number is less than 1, or your formula is malformed. Check the formula for missing commas or parentheses.
- Wrong results with TRUE: Your first column is not sorted ascending. Sort it, or switch to FALSE.
- Formula works but returns wrong value: Verify that the lookup value is unique. VLOOKUP returns the first match, so duplicates in the first column cause incorrect results.
- Excel says “There’s a problem with this formula”: Check for non-English function names (e.g., SVERWEIS in German) or locale-specific separators. Use commas for arguments in English Excel.
Frequently Asked Questions
Q: Can VLOOKUP look to the left?
No. VLOOKUP only searches the first column of the table array and returns values to the right. Use INDEX/MATCH or XLOOKUP to look left.
Q: What’s the difference between TRUE and FALSE in VLOOKUP?
FALSE requires an exact match. TRUE finds the closest match that is less than or equal to the lookup value, but the first column must be sorted ascending. For most lookups, use FALSE.
Q: How do I copy VLOOKUP down without changing the table array?
Use absolute references with $, like $A$2:$B$10. Alternatively, use a named range.
Q: Why does VLOOKUP return the first match even if there are duplicates?
VLOOKUP stops at the first match in the first column. If duplicates exist, it always returns the topmost one. To get all matches, use FILTER (Excel 365) or a pivot table.
Q: Is VLOOKUP case-sensitive?
No, VLOOKUP ignores case. “apple” and “APPLE” match. For case-sensitive lookups, use INDEX/MATCH with EXACT.
Q: Can I use VLOOKUP across different sheets?
Yes. Reference the sheet name in the table array, e.g., =VLOOKUP(E2, Sheet2!$A$2:$B$10, 2, FALSE). If the sheet name has spaces, use single quotes: 'My Sheet'!$A$2:$B$10.
Related
- VLOOKUP in Google Sheets: How to Use It
- Does Google Sheets Have VLOOKUP? How to Use It
- Google Sheets VLOOKUP: Formula, Examples, and Fixes
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel NOW Function Not Updating? Causes and FixesExcel’s NOW() function does update, but it does not run like a live clock: it returns the current…
- Conditional Formatting Formula in Excel: How to Use ItIn Excel, a conditional-formatting equation is a formula that returns TRUE or FALSE; Excel applies the chosen format…
- Excel SUMIF Text Match: Formula & ExamplesThe direct answer: use =SUMIF(range, "text", sum_range) to sum cells when a matching text value appears in another…
- Subtotal Formula in Excel: How to Use SUBTOTALThe SUBTOTAL formula in Excel is =SUBTOTAL(function_num, range1, [range2], ...). For example, =SUBTOTAL(9, A2:A10) returns the sum of…
- Excel Absolute Reference: How to Lock a Cell in a FormulaTo make a cell reference absolute in Excel, put a dollar sign before both its column letter and…
- VLOOKUP Between Two Excel Workbooks: A Simple GuideYes. In Excel for Microsoft 365 on Windows, VLOOKUP can search a table in another workbook by using…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.