Excel error

How to fix the #N/A error in Excel

#N/A means “not available”. Almost always, a lookup function (VLOOKUP, XLOOKUP, MATCH, HLOOKUP) searched for a value and didn’t find an exact match.

#N/A

Why it happens

The value really isn’t there

You looked up order 1012 but the list stops at 1008. Check the lookup range covers every row, including new ones added at the bottom.

Extra spaces or invisible characters

“East” and “East ” look identical but don’t match. Clean the data with TRIM, or look up TRIM(value).

Numbers stored as text

A lookup value of 1006 won’t match the text “1006” imported from another system. Convert with VALUE, or Data → Text to Columns.

Approximate match on unsorted data

VLOOKUP without FALSE (or MATCH without 0) assumes sorted data and can return #N/A or the wrong row. Always ask for an exact match.

The lookup column is in the wrong place

VLOOKUP only searches the first column of its table. If your key is in column C, start the table at C, or use XLOOKUP.

How to fix it

Ask for an exact match

=VLOOKUP(1006,A2:F9,3,FALSE) → Omar

Show a friendly message when nothing is found

=IFERROR(VLOOKUP(1099,A2:F9,3,FALSE),"Not found") → Not found

With XLOOKUP, use its built-in fallback

=XLOOKUP(1099,A2:A9,C2:C9,"Not found") → Not found

Examples use this sample sheet of orders:

A
B
C
D
E
F
1
Order
Region
Rep
Units
Price
Revenue
2
1001
East
Maya
4
12
48
3
1002
West
Omar
2
30
60
4
1003
East
Lena
7
12
84
5
1004
North
Maya
1
45
45
6
1005
West
Lena
5
30
150
7
1006
East
Omar
3
18
54
8
1007
North
Lena
6
12
72
9
1008
West
Maya
8
18
144

Tip: Prefer IFNA over IFERROR for lookups: it hides only “not found”, so a typo elsewhere in the formula still shows up.

Other Excel errors