If VLOOKUP says a value is missing even though you can see it, the usual causes are an inexact match setting, a lookup range that starts in the wrong column, or a difference hidden in the data, such as extra spaces or numbers stored as text. Start by specifying an exact match with FALSE, then check the range and compare the lookup value with the source value for invisible or formatting differences.
What VLOOKUP expects
VLOOKUP searches down the first column of a range you provide, finds a matching value there, and returns a value from another column on the same row. The lookup column must therefore be the leftmost column in the selected range. VLOOKUP does not search every column in the worksheet for the value, nor does it look to the left of the lookup column.
Its basic arguments are the value to find, the table range, the number of the column to return from that range, and whether to use an exact or approximate match. The return-column number is counted from the left edge of the selected range, not from the worksheet’s column letters. If the selected range is B:D, for example, B is column 1, C is column 2, and D is column 3.
That last match argument is particularly important. If you omit it, VLOOKUP uses approximate matching, which expects the first column to be sorted in ascending order and may return a nearby result instead of the one you intended. For ordinary searches such as an order number, product code, or name, an exact match is generally the right choice.
Set the match argument to exact
With lookup keys in A2:A100, the values to return in C2:C100, and the search key in E2, this formula searches the first column of A:C and returns the third column’s value on the matching row:
=VLOOKUP(E2,$A$2:$C$100,3,FALSE)
FALSE tells Excel to look for an exact match; 0 can be used instead. If the fourth argument is missing or set to TRUE, Excel can use approximate matching. With unsorted data, that can produce a surprising result or a not-found error even when the desired value appears farther down the list. Do not rely on approximate matching for ordinary identifiers.
Check that the formula you are troubleshooting actually includes this fourth argument. A formula may have been copied from an older workbook or written without it. Changing the match argument will not correct a bad range or mismatched data, but it removes one common source of unexpected results.
Check the lookup range and return-column number
Confirm that the column containing the value to find is the first column in the range. If product codes are in column C and descriptions are in column D, a range beginning at A cannot find those codes by searching C. Select a range that begins at C instead. If the desired return value lies to the left of the lookup column, standard VLOOKUP cannot retrieve it; choose another lookup method or rearrange the source data.
Next, count the return column from the range’s first column. Suppose the range is A:C and the value you want is in C: the column index is 3. If the range is B:C, the index for C is 2. A wrong index may return a value from the wrong field; an index larger than the number of columns in the selected range produces #REF!.
Also inspect the actual range boundaries. A lookup range ending at row 50 will not include a match in row 51. When copying a formula down, relative references can shift the range, so the dollar signs in $A$2:$C$100 keep it fixed. If the source list is regularly extended, converting it to an Excel table can make formulas easier to maintain as rows are added.
Look for extra spaces and invisible characters
Two values can look identical on screen but differ because one contains a leading space, a trailing space, repeated spaces, or a nonbreaking space copied from a website or report. VLOOKUP compares the underlying text, not just what is visible in the cell. A normal space and a nonbreaking space are different characters, so removing ordinary spaces alone may not solve the problem.
For a quick check, compare the lengths of the two text values or click into each cell and inspect the beginning and end of its contents. A temporary helper formula can clean common unwanted characters. With the suspect source value in A2, this formula replaces nonbreaking spaces with ordinary spaces, removes nonprinting ASCII control characters, and trims leading, trailing, and repeated standard spaces:
=TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," ")))
Use a corresponding cleaned helper value for the lookup key as well; cleaning only one side can leave the mismatch in place. Compare the cleaned results, then use the cleaned columns consistently in the lookup. This formula handles common issues, but it does not remove every possible Unicode character or resolve every locale-specific formatting difference. Keep the original data until you have verified that cleaning has not changed meaningful content.
Check whether one value is text and the other is a number
A cell can display 12345 while storing the value as text, whereas another cell displays the same digits as a number. Exact lookup can fail when the lookup key and the first-column value have different underlying types. This often happens after importing a CSV, pasting values from another system, or preserving leading zeros in an identifier.
Check both sides rather than trusting the display format. With the suspected value in A2, =ISTEXT(A2) returns TRUE if it is text; =ISNUMBER(A2) returns TRUE if it is numeric. Apply the same checks to the lookup cell. These are diagnostic formulas, not a reason to convert every identifier to a number.
Choose a consistent representation based on what the data means. For quantities, dates, and numeric measurements, converting text-formatted numbers into real numbers may be appropriate. For account numbers, postal codes, and product IDs, the digits may be labels rather than amounts. Converting an ID such as 00123 to a number can drop its leading zeros. In that case, keep both lookup values as text and standardize the formatting without changing the identifier.
Identify the error or unexpected result
The exact result can point to the problem. #N/A usually means an exact match was not found in the first column of the selected range, although a range that omits the row or a text-number mismatch can explain why. #REF! commonly indicates that the requested return-column index is outside the selected range. If VLOOKUP returns a plausible value from the wrong row or field, check the match mode, range start, and column index.
A result of 0 does not necessarily mean the lookup failed. If the matching row’s return cell is genuinely blank, Excel may display zero as the result. Check that source cell and, if a blank result should appear blank, decide how your workbook should handle it rather than treating every zero as an error. VLOOKUP is also not case-sensitive, so it does not distinguish codes such as AB12 and ab12. If capitalization is meaningful, a different, case-sensitive approach is needed.
Wrapping a formula in IFERROR can make a report look cleaner, but it can also hide mistakes. With the same E2 lookup key and A:C range used above, this formula displays a message when the lookup or another part of the formula returns an error:
=IFERROR(VLOOKUP(E2,$A$2:$C$100,3,FALSE),"Not found")
Use that only after investigating the underlying issue. Otherwise, a broken reference or invalid column index can be presented as if the value were simply absent, making the real cause harder to find.
Make sure Excel is calculating and displaying the formula
Sometimes the formula is valid but its displayed result has not updated, or Excel is showing the formula text instead of the result. In Microsoft 365 for Windows, check Formulas > Calculation Options > Automatic if results are stale. In Excel for Mac, check the Formulas tab’s Calculation Options setting; menu labels and placement can vary slightly by release. After changing a calculation setting, recalculate the workbook if needed.
If a cell displays the characters of the formula, check whether the cell is formatted as Text or whether the formula was entered with a leading apostrophe. Change the cell format to General, then re-enter the formula so Excel evaluates it. Also check Formulas > Show Formulas: when that display option is on, Excel shows formulas in cells instead of their calculated results. These display or calculation issues are different from a failed lookup, but they can make a working formula appear broken.
A practical troubleshooting order
Work through the checks in a consistent order. This makes it easier to isolate the cause instead of changing several parts of the workbook at once:
- Confirm the formula uses
FALSEor0for an exact match. - Verify that the lookup column is the first column of the selected range and that the range includes the matching row.
- Count the return-column index from the left edge of that range.
- Compare the stored values, not just their appearance: check text versus number, leading zeros, spaces, and copied characters.
- Inspect the matching row’s return cell, especially if the formula returns 0 or an unexpected field.
- Check calculation mode, cell formatting, and Show Formulas if the displayed result does not reflect the formula.
Change one thing at a time and test the formula again. For a large worksheet, copy the lookup key into an empty cell and use helper checks to compare type or clean text. This makes the investigation safer than replacing values throughout the original dataset. Once the cause is understood, make the correction in the source data or in a documented helper column so future imports do not recreate the same mismatch.
When XLOOKUP may be a better option
VLOOKUP is still useful for straightforward tables, but it depends on a numeric column index and requires the lookup column to sit on the left. In Microsoft 365, XLOOKUP can search one range and return a result from a separate range, including a column to its left. It also allows an explicit not-found message and uses exact matching by default.
With lookup keys in A2:A100, return values in C2:C100, and the search key in E2, this formula returns the corresponding value or the words Not found:
=XLOOKUP(E2,A2:A100,C2:C100,"Not found",0)
XLOOKUP is available in Microsoft 365 and Excel 2021 or later, but not in older perpetual editions such as Excel 2019. If a workbook will be opened in an older version, VLOOKUP or INDEX and MATCH may be more compatible. Switching functions does not automatically repair hidden spaces or inconsistent data types, so the same data checks still matter.
Frequently Asked Questions
Why does VLOOKUP return #N/A when the value is clearly there?
It may be outside the selected range, not in the range’s first column, or stored differently from the lookup key. Set the final argument to FALSE, then check spaces, nonbreaking spaces, and text-versus-number differences.
Does VLOOKUP need an exact match?
For most searches by ID, name, or code, yes. Include FALSE as the fourth argument. If that argument is omitted, VLOOKUP uses approximate matching, which is intended for suitably sorted data rather than a general exact search.
Why does VLOOKUP return the wrong value?
Check whether the formula uses approximate matching, whether its range starts with the correct lookup column, and whether its return-column number is counted from the range’s left edge. Also confirm that the match is on the intended row.
Can VLOOKUP search to the left?
No. Its lookup column must be the first column in the table range, and it returns values from columns to the right. XLOOKUP in Microsoft 365 or Excel 2021 and later can return values from a separate range on either side.
Why does VLOOKUP show 0 for a blank result?
The matching row may contain a genuinely blank cell in the return column, which Excel can display as zero in the formula result. Inspect that source cell and decide whether your workbook should show a blank or another clear indicator instead.
Related
- Heat Map Examples in PowerPoint: Ideas and How to Make Them
- Google Sheets for Data Analysis: Tools and Limits
- Google Sheets IF Formula: Examples and Common Uses
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel OFFSET Formula Not Working? Fix Common ErrorsIf an Excel OFFSET formula is not working, check that its starting reference and row and column offsets…
- Excel Flash Fill Down: How to Use It and Fix IssuesYes. In Excel for Microsoft 365 on Windows, enter one or two examples in an empty adjacent column,…
- Excel Print Area: How to Fix It and Print the Right CellsTo fix an Excel print area, select the cells you want on paper, then choose Page Layout >…
- Outlook Find Related Messages Not Working? FixesIf Outlook’s Find Related command is missing or returns no messages, first check which Outlook version you’re using:…
- Excel Text Hidden Behind the Next Cell? How to Fix ItIf Excel text looks hidden behind the next cell, it is usually still in the original cell: Excel…
- Excel UNIQUE Formula Not Working? Fix Common IssuesIf Excel’s UNIQUE formula is not working, first check that you have Microsoft 365 or Excel 2021 or…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.