If your VLOOKUP returns #N/A or the wrong value, the most common causes are a lookup value that isn’t an exact match, the lookup column not being the leftmost column in the table, or the table range not being locked with absolute references. Fix those three first, and most VLOOKUP failures disappear.
How VLOOKUP Actually Works
VLOOKUP searches for a value in the first column of a table range, then returns a value from a specified column to the right. Its syntax is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). The fourth argument is where most people trip: FALSE (or 0) forces an exact match, while TRUE (or 1) allows an approximate match and requires the first column to be sorted ascending. If you omit the fourth argument, Excel defaults to TRUE, which causes unexpected results when your data isn’t sorted.
For example, with names in A2:A10 and scores in B2:B10, =VLOOKUP("Lena", A2:B10, 2, FALSE) returns Lena’s score. If you write =VLOOKUP("Lena", A2:B10, 2) without the FALSE, Excel assumes approximate match and may return the score of the closest name alphabetically, not Lena’s.
Why VLOOKUP Returns #N/A
#N/A means Excel cannot find the lookup value in the first column of the table array. Common reasons:
- The lookup value has extra spaces (e.g., “Lena ” vs “Lena”). Use
=TRIM(A2)to clean it. - The lookup value is numeric but the table column contains text-formatted numbers, or vice versa. Check for a green triangle in the cell corner.
- The lookup value is a date, but the table stores dates as text. Use
=DATEVALUE()to convert. - The table range doesn’t include the row where the value exists. Extend the range.
- The lookup value contains non-printing characters from a web paste. Use
=CLEAN(A2)to remove them.
To debug, click on the cell with #N/A, go to the Formulas tab, and use Evaluate Formula to step through the calculation. That shows exactly what Excel is seeing.
Why VLOOKUP Returns the Wrong Value (Not #N/A)
If VLOOKUP returns a value that’s not from the matching row, the usual culprit is the range_lookup set to TRUE or omitted. With TRUE, Excel finds the largest value in the first column that is less than or equal to the lookup value, assuming the column is sorted. If it’s not sorted, results are unpredictable. Always use FALSE for exact matches unless you specifically need an approximate match (like finding a tax bracket).
Another cause: the col_index_num is wrong. If your table is A:C, and you ask for column 2, you get column B. If you ask for 3, you get C. If you ask for 4, you get #REF! because the table only has 3 columns.
Common Mistakes with Table Arrays
The table array must have the lookup value in its first column. VLOOKUP cannot look to the left. If your lookup value is in column B and you want a value from column A, VLOOKUP won’t work directly. Use INDEX/MATCH instead: =INDEX(A2:A10, MATCH(B2, B2:B10, 0)).
Also, when copying the formula down, the table array must be absolute (with $ signs). If you write =VLOOKUP(A2, B2:D10, 2, FALSE) and drag down, the range shifts to B3:D11, then B4:D12, and so on. Lock it: =VLOOKUP(A2, $B$2:$D$10, 2, FALSE).
If you add rows to your data later, a fixed range like $B$2:$D$10 won’t include them. Consider using a table (Insert > Table) and referencing the table name, e.g., =VLOOKUP(A2, Table1, 2, FALSE), which automatically expands.
Exact Match vs Approximate Match
Exact match (FALSE) finds the first row where the lookup value equals the first column value. Approximate match (TRUE) finds the largest value that is less than or equal to the lookup value, so the first column must be sorted ascending. Use approximate match for:
- Tax brackets (income up to a limit)
- Shipping cost by weight (weight up to a tier)
- Letter grades by score (score up to a threshold)
Example: with thresholds in A2:A6 (0, 60, 70, 80, 90) and grades in B2:B6 (F, D, C, B, A), =VLOOKUP(85, A2:B6, 2, TRUE) returns B because 85 is between 80 and 90.
For exact match, always use FALSE. Never rely on the default.
Alternatives When VLOOKUP Fails
If VLOOKUP keeps failing, switch to a more robust function:
- INDEX/MATCH – works with lookup column anywhere, handles left lookups, and doesn’t break if you insert columns. Syntax:
=INDEX(return_range, MATCH(lookup_value, lookup_range, 0)). For example, with names in B2:B10 and scores in A2:A10,=INDEX(A2:A10, MATCH("Lena", B2:B10, 0))returns Lena’s score. - XLOOKUP – available in Excel 2021 and Microsoft 365. It’s simpler:
=XLOOKUP(lookup_value, lookup_range, return_range). It defaults to exact match, allows left lookups, and has built-in error handling. Example:=XLOOKUP("Lena", B2:B10, A2:A10). - FILTER – if you need multiple matches, use
=FILTER(return_range, condition). For example,=FILTER(A2:A10, B2:B10="Lena")returns all scores for Lena.
XLOOKUP is the recommended replacement, but it requires a newer Excel version. If you’re on an older version, INDEX/MATCH works everywhere.
How to Fix VLOOKUP Errors Step by Step
- Check the fourth argument – set it to
FALSEfor exact match. - Verify the lookup value exists – use
=COUNTIF(table_first_column, lookup_value)to see if it’s there. If it returns 0, the value isn’t in the column. - Clean the data – apply
=TRIM(),=CLEAN(), and check number formats. - Lock the table range with $ signs or use a table reference.
- Confirm the column index number – count from the first column of the table array.
- If the value is still not found, try
=VLOOKUP("*"&A2&"*", B2:B10, 1, FALSE)to find partial matches, but be careful: this can return false positives.
For example, if you have a list of product IDs in A2:A100 and prices in B2:B100, and you want the price for ID in D2, use =VLOOKUP(D2, $A$2:$B$100, 2, FALSE). If it returns #N/A, check that D2 doesn’t have a trailing space.
Frequently Asked Questions
Why does VLOOKUP return #N/A even though the value is visible?
Usually because of hidden characters or format mismatch. The value might look like “123” but be stored as text. Use =ISNUMBER(A2) to check. If it’s FALSE, convert to number by multiplying by 1: =A2*1.
Can VLOOKUP look up to the left?
No. VLOOKUP only searches the first column of the table array and returns values to the right. For left lookups, use INDEX/MATCH or XLOOKUP.
Why does VLOOKUP return the previous row’s value?
That’s the approximate match behavior. If you omitted the fourth argument or set it to TRUE, and your first column isn’t sorted, Excel picks the closest lower value. Set the argument to FALSE.
How do I use VLOOKUP with multiple criteria?
VLOOKUP can’t handle multiple criteria directly. Create a helper column that concatenates the criteria, e.g., =A2&B2, then look up that concatenated value. Or use XLOOKUP with a concatenated lookup: =XLOOKUP(D2&E2, A2:A10&B2:B10, C2:C10) – but that requires Microsoft 365.
Does VLOOKUP work with wildcards?
Yes, when using exact match (FALSE), you can use wildcards in the lookup value: * for any sequence, ? for a single character. Example: =VLOOKUP("L*", A2:B10, 2, FALSE) finds the first name starting with L. But this can be slow on large datasets.
Why does VLOOKUP return #REF!?
#REF! means the column index number is larger than the number of columns in the table array. If your table is A:C (3 columns), and you ask for column 4, you get #REF!. Check your col_index_num.
Related
- Button Cell Battery Charger: How It Works & What to Know
- Windows Zoom Out Shortcut Keys: Full Guide
- Generate Random Numbers in MATLAB: randi, rand & More
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Scenario Management in Excel: Compare What-If CasesIn Excel for Microsoft 365 on Windows, use Data > What-If Analysis > Scenario Manager to save different…
- Excel SUM Times Formula: Multiply Values, Then Add ThemIf quantities are in B2:B5 and unit prices are in C2:C5, use =SUMPRODUCT(B2:B5,C2:C5) to multiply each quantity by…
- Excel Growth Rate Formula: Calculate Change Over TimeTo calculate growth rate in Excel, divide the change between the new and old values by the old…
- Excel MEDIAN Function Examples and How It WorksTo find the middle value in Excel, use the MEDIAN function: with your numbers in B2:B8, enter =MEDIAN(B2:B8).…
- COUNTIF Excel: How to Reference Cells in CriteriaTo make COUNTIF use a cell as its criterion, put the cell reference in the second argument: with…
- XLOOKUP vs LOOKUP: Key Differences ExplainedThe main difference between XLOOKUP and LOOKUP is that XLOOKUP searches for a value in one column or…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.