If your VLOOKUP is returning the wrong value, the most common cause is that the lookup column is not the leftmost column in your table array, or the data types don’t match. The fix is usually to reorder your data, use INDEX/MATCH, or switch to XLOOKUP.
Why VLOOKUP Fails: The Leftmost Column Rule
VLOOKUP searches for a value in the first column of a range you specify (the table array) and returns a value from a column to the right. This is the single most common reason for “wrong” results: if your lookup value (like an ID) is in column B but your table array starts at column A, VLOOKUP will search column A, not find the ID, and return a #N/A error or, worse, match a value that happens to be in column A. For example, if you have names in column A and IDs in column B, and you use =VLOOKUP("A123", A:B, 2, FALSE), Excel looks for “A123” in column A (names) and fails.
To fix this, either move the lookup column to the leftmost position in your range, or use a function that doesn’t have this restriction. In Excel 365 and Excel 2021, XLOOKUP is the modern replacement and does not require the lookup column to be first.
Exact Match vs. Approximate Match (FALSE vs. TRUE)
VLOOKUP’s fourth argument, range_lookup, controls whether you get an exact or approximate match. If you omit it or type TRUE (or 1), Excel assumes your data is sorted and returns the largest value that is less than or equal to the lookup value. This is a classic source of “wrong” results: you search for 100, but the closest value below it is 95, so you get 95’s result. For most lookups, you want FALSE (or 0) for an exact match.
Example: =VLOOKUP(100, A2:B10, 2, FALSE) returns the value from column B where column A exactly equals 100. If you use TRUE instead, and your data is not sorted, you’ll get unpredictable results. Always use FALSE unless you deliberately need an approximate match (e.g., tax brackets).
Data Type Mismatches: Text vs. Numbers
Another frequent culprit is that your lookup value is text but your data is numeric, or vice versa. For instance, if your ID column contains numbers but your lookup cell contains text (e.g., because it was imported with an apostrophe), VLOOKUP won’t match. Similarly, numbers formatted as text (with green triangles) will not match true numbers. To fix, convert the lookup value to a number using VALUE() or multiply by 1, or convert the data column to text using TEXT().
Example: =VLOOKUP(VALUE(A1), B2:C10, 2, FALSE) forces A1 to a number. Or, if your data is text, use =VLOOKUP(TEXT(A1,"0"), B2:C10, 2, FALSE). Also, check for trailing spaces in either the lookup value or the data—use TRIM() to remove them.
Hidden Characters and Formatting Issues
Imported data often contains non-printing characters like line breaks or non-breaking spaces that are invisible. These break exact matches. Use CLEAN() to remove line breaks and TRIM() to remove extra spaces. For example, =VLOOKUP(TRIM(CLEAN(A1)), B2:C10, 2, FALSE).
Also, check if your data has leading zeros that are being dropped. If your ID is “00123” and it’s stored as a number, it becomes 123. To preserve it, format the column as text before entering data, or use a custom number format like “00000”.
How to Choose Between VLOOKUP, INDEX/MATCH, and XLOOKUP
If you are on Excel 365 or Excel 2021, use XLOOKUP—it’s simpler and more powerful. The syntax is =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]). It allows left lookups, exact matches by default, and returns a custom message if not found.
If you are on an older version (Excel 2019 or earlier), use INDEX/MATCH: =INDEX(return_column, MATCH(lookup_value, lookup_column, 0)). This works with any column order. VLOOKUP is still fine for simple right-lookups on sorted data, but it’s limited.
Common VLOOKUP Errors and Their Meanings
- #N/A: No match found. Check spelling, data types, and hidden characters.
- #REF!: Your column index number is greater than the number of columns in the table array.
- #VALUE!: Your lookup value is longer than 255 characters, or the range is invalid.
- #NAME?: You misspelled the function name or used a text string without quotes.
For #N/A, a quick way to debug is to use =COUNTIF(lookup_column, lookup_value) to see if the value exists at all. If it returns 0, the value isn’t there.
Frequently Asked Questions
Why does VLOOKUP return the previous row’s value?
That happens when you use approximate match (TRUE) and your data is not sorted ascending. VLOOKUP assumes sorted data and returns the closest match below the lookup value. Sort your lookup column ascending, or switch to FALSE for exact match.
Can VLOOKUP look to the left?
No. VLOOKUP can only return values to the right of the lookup column. To look left, use INDEX/MATCH or XLOOKUP. For example, =INDEX(A:A, MATCH(D1, B:B, 0)) returns a value from column A based on a match in column B.
How do I return multiple columns with VLOOKUP?
You can copy the formula across columns and change the column index number, but you must ensure the table array is absolute (e.g., $A$2:$C$10). Alternatively, use XLOOKUP with a return array that spans multiple columns, or use INDEX/MATCH with a column offset.
Why does VLOOKUP work on one sheet but not another?
Check that the sheet name is correct and not misspelled, and that the range references the correct sheet. Also, if the other sheet has data formatted differently (e.g., text vs. number), apply the same data type fixes.
Does VLOOKUP ignore blank cells?
VLOOKUP does not ignore blanks. If your lookup value matches a blank cell (which is rare), it returns 0. For approximate matches, blanks can cause issues. Use IFERROR to handle blanks: =IFERROR(VLOOKUP(...), "Not found").
What is the fastest way to troubleshoot a wrong VLOOKUP?
Start by checking the range_lookup argument (should be FALSE), then verify the table array starts with the lookup column, then check data types and hidden characters. Use the Evaluate Formula tool (Formulas tab > Formula Auditing > Evaluate Formula) to step through the calculation.
Alternatives to VLOOKUP for Complex Lookups
If you need to match on multiple criteria, use INDEX/MATCH with an array formula or use XLOOKUP with a concatenated lookup. For example, to match on both ID and date: =XLOOKUP(A2&B2, C2:C100&D2:D100, E2:E100) (in Excel 365). Or use SUMIFS if you need to sum values, not return a single cell.
For approximate matches on sorted data, VLOOKUP with TRUE is still valid, but be aware of its limitations. For fuzzy matching (e.g., names with typos), you’d need a more advanced approach like FUZZYLOOKUP add-in or Power Query, which are beyond VLOOKUP’s scope.
Related
- Data Entry Computer Course: What It Covers & Is It Worth It?
- Splitting Strings in Java: Methods and Examples
- Generate Random Number in Oracle SQL?
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel Encrypt with Password Greyed Out? FixIf the Encrypt with Password option in Excel is greyed out, it is almost always because the workbook…
- Excel Find Names Missing From a List With FormulasTo find names in one Excel list that are absent from another, put the first list in A2:A100…
- Fix Data Validation in Excel: Lists, Rules, and ErrorsTo fix data validation in Excel, select an affected cell, choose Data > Data Validation, check the Settings…
- Excel Data Table Not Working? Fix the What-If ToolIf an Excel What-If Analysis data table is not working, first check that its output formula and test…
- Excel New Line in Cell: Add Line Breaks and Fix ThemTo start a new line inside an Excel cell, edit the cell, place the cursor where the break…
- Excel Freeze Panes Not Working? Fix the Common CausesIf Excel Freeze Panes is not working, first choose the cell just below the rows and to the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.