Services
Study guides
Free tools
#N/A means a lookup or match function could not find the value. The value may be missing, spelled differently, stored as text instead of a number, or surrounded by spaces. Use exact-match mode and return a clear fallback.
The short answer
#N/A means a lookup or match function could not find the value. The value may be missing, spelled differently, stored as text instead of a number, or surrounded by spaces. Use exact-match mode and return a clear fallback.
VLOOKUP defaults to approximate match when the fourth argument is missing. Add FALSE. XLOOKUP is exact by default, but check its match_mode argument if you changed it.
=VLOOKUP(A2,$D$2:$F$500,3,FALSE)Trim spaces and align the data type. If one side is text, convert it with VALUE or convert both sides to text with TEXT.
=XLOOKUP(TRIM(A2),TRIM($D$2:$D$500),$B$2:$B$500,"Not found")IFNA catches only #N/A, so genuine syntax or reference errors still surface. Use it when a missing lookup is a normal business case.
=IFNA(VLOOKUP(A2,$D$2:$F$500,3,FALSE),"Not found")Use LEN to compare the visible text with its stored length. A value that looks like 8 characters but has LEN 9 usually contains a trailing space or non-breaking space.
=LEN(A2)=IFNA(XLOOKUP(TRIM(A2),TRIM($D$2:$D$500),$B$2:$B$500),"Not found")Exact lookup with trimmed input and a controlled fallback; only #N/A is replaced.
Paste the formula into the free browser tools to see the exact fix without uploading your file. The Error Fixer explains the code, the Formula Checker finds syntax problems, and the Formula Explainer breaks down nested logic.
#N/A means a lookup or match function could not find the value. The value may be missing, spelled differently, stored as text instead of a number, or surrounded by spaces. Use exact-match mode and return a clear fallback.
Force an exact match: VLOOKUP defaults to approximate match when the fourth argument is missing. Add FALSE. XLOOKUP is exact by default, but check its match_mode argument if you changed it. Normalise both sides of the lookup: Trim spaces and align the data type. If one side is text, convert it with VALUE or convert both sides to text with TEXT.
Usually because only some rows contain the trigger: The lookup value does not exist in the lookup column. One value is stored as text and the other as a number (for example, 1001 vs "1001"). Leading or trailing spaces, non-breaking spaces or inconsistent capitalisation.
Exact lookup with trimmed input and a controlled fallback; only #N/A is replaced. Use this pattern as a guard: =IFNA(XLOOKUP(TRIM(A2),TRIM($D$2:$D$500),$B$2:$B$500),"Not found")
Still stuck?
A human Excel expert can repair the formula, explain the cause and return a tested workbook — usually within 24 hours. Fixed quote before work starts, from $15/hr.