VLOOKUP Returning #N/A? 7 Fixes (and When to Switch to XLOOKUP)
You write a VLOOKUP, drag it down, and half the column shows #N/A, even though you can see the value sitting right there in the lookup table. Here is how to find the cause in a few minutes.
The problem
#N/A simply means "Excel could not find an exact match." The value usually is there; it just doesn't match character for character. Work through the fixes below in order. The first three solve most cases.
Step-by-step fix
1. Make sure you are using exact match
The fourth argument of VLOOKUP decides the match type. Leave it blank and Excel uses approximate match, which returns wrong results or #N/A on unsorted data. Always end the formula with FALSE (or 0):
=VLOOKUP(A2, Products!$A:$D, 3, FALSE)
2. Check for numbers stored as text
The most common cause. An ID of 1001 typed as a number will not match "1001" stored as text, which often happens with CSV exports and QuickBooks reports. Signs: a small green triangle in the cell corner, or values aligned left. Fixes:
- Select the column, then Data → Text to Columns → Finish. This converts text to numbers in one click.
- Or convert inside the formula:
=VLOOKUP(VALUE(A2), ...)when the lookup table holds numbers, or=VLOOKUP(TEXT(A2,"0"), ...)when it holds text.
3. Remove hidden spaces and non-printing characters
"ACME " with a trailing space is not "ACME". Wrap the lookup value in TRIM, and use CLEAN for line breaks pasted in from other systems:
=VLOOKUP(TRIM(CLEAN(A2)), Products!$A:$D, 3, FALSE)
If the spaces are in the lookup table itself, clean that column with a helper column of =TRIM(A2) and paste the values back. Web data sometimes contains non-breaking spaces (CHAR(160)), which TRIM does not remove, so use =SUBSTITUTE(A2,CHAR(160)," ") first.
4. Lock the table range
If the formula works in row 2 but breaks lower down, the table range shifted as you dragged. Add dollar signs (press F4) so it stays put: $A$2:$D$500, or reference whole columns like $A:$D.
5. Confirm the lookup column is the first column
VLOOKUP can only search the left-most column of the range and return values to the right of it. If your key is in column C and the answer is in column A, VLOOKUP cannot do it. Use XLOOKUP or INDEX/MATCH (below).
6. Check the column index number
The third argument counts columns from the start of the range, not from column A of the sheet. If someone inserted a column into the lookup table, the index now points at the wrong column. XLOOKUP avoids this entirely.
7. Handle genuinely missing values cleanly
Once the real errors are fixed, some values may truly be missing. Show a friendly result instead of #N/A, but only after fixing the causes above, or you will hide real problems:
=IFNA(VLOOKUP(A2, Products!$A:$D, 3, FALSE), "Not found")
The better option: XLOOKUP
If you have Microsoft 365 or Excel 2021+, XLOOKUP fixes most VLOOKUP headaches at once: exact match is the default, it can look left, it does not break when columns are inserted, and it has a built-in "if not found" argument.
=XLOOKUP(A2, Products!$A:$A, Products!$C:$C, "Not found")
On older Excel versions, the INDEX/MATCH combination gives the same flexibility:
=INDEX(Products!$C:$C, MATCH(A2, Products!$A:$A, 0))
Quick checklist
- Fourth argument is FALSE / 0
- Both sides are the same type (number vs text)
- No extra spaces (TRIM / CLEAN / CHAR(160))
- Table range locked with $
- Lookup key is in the first column (or use XLOOKUP)
- Column index still points at the right column
Frequently asked questions
Almost always because the two values are not identical: one is a number and the other is text, there is a hidden space, or the formula is using approximate match. Fixes 1 to 3 above cover these.
For most work, yes. It defaults to exact match, can return values to the left, survives inserted columns, and handles "not found" without IFERROR. It needs Microsoft 365 or Excel 2021 or later.
IFNA. It only catches "not found" results, so real mistakes like #REF! or #VALUE! still show up. IFERROR hides every error, including the ones you need to see.
The fourth argument is missing or TRUE, so Excel is doing an approximate match on unsorted data. Set it to FALSE.
Yes, with the same syntax and the same fixes. Google Sheets also has XLOOKUP.