A lookup miss is #N/A. A deleted reference is #REF!. A zero divisor is #DIV/0!. IFERROR treats those as the same blank. IFNA does not. If you wrap first and read later, a broken index looks like “not found.”
Why it happens
IFERROR(value, fallback) replaces any error with the fallback: #N/A, #REF!, #DIV/0!, #VALUE!, #NAME?, #NUM!, and a parse #ERROR!.
IFNA(value, fallback) replaces only #N/A. Every other error stays in the cell.
A dashboard that should say “no sku” used IFERROR and now also says “no sku” when someone deletes a column, types VLOKUP, or divides by a blank. That is the bug this comparison exists for.
Reproduce it in a minute
Open a blank spreadsheet. In A1 type
sku, B1name. A2101, B2Widget. D1lookup. D2999— that sku is not in column A.A real miss. In E2 enter:
=VLOOKUP(D2,A2:B2,2,FALSE)
E2 shows #N/A. The tooltip is Did not find value '999' in VLOOKUP evaluation. Leave E2 broken.
- A bad index, not a miss. In F2 enter:
=VLOOKUP(A2,A2:B2,3,FALSE)
F2 shows #REF!. Sku 101 is on the sheet. Index 3 is past a two-column range. Use a key that exists so this cell cannot be mistaken for #N/A.
- A zero divisor. In G2 type
0. In G3 enter:
=1/G2
G3 shows #DIV/0!. You now have three different errors on one sheet. Leave them broken.
-
IFERRORon all three. In E6 enter:
=IFERROR(VLOOKUP(D2,A2:B2,2,FALSE),"none")
E6 shows none. In F6 enter:
=IFERROR(VLOOKUP(A2,A2:B2,3,FALSE),"none")
F6 shows none. In G6 enter:
=IFERROR(1/G2,"none")
G6 shows none. The miss, the bad index, and the divide all look identical.
-
IFNAon all three. In E9 enter:
=IFNA(VLOOKUP(D2,A2:B2,2,FALSE),"none")
E9 shows none. In F9 enter:
=IFNA(VLOOKUP(A2,A2:B2,3,FALSE),"none")
F9 is still #REF!. In G9 enter:
=IFNA(1/G2,"none")
G9 is still #DIV/0!. Only the lookup miss became none.
- Confirm the miss before you wrap. Type
101in D2. E2 becomes Widget. Put999back. If changing the lookup value makes#N/Acome and go, the function is working and the key is absent — or the key does not actually match.
The fix
Leave E2, F2, and G3 as the raw errors. Leave the IFERROR row in place so you can compare.
Lookups: IFNA. Keep E9: =IFNA(VLOOKUP(D2,A2:B2,2,FALSE),"none") returns none for 999 and still surfaces F9 #REF! if you copy the wrapper onto a bad index. That is the point.
When no match is not a valid result. Do not wrap. Fix the key, the range, or the table.
XLOOKUP already has a miss argument. The fourth argument (missing_value in Sheets; Excel callers know it as if_not_found) returns your fallback on #N/A only, same idea as IFNA. It does not swallow #REF! from a broken range. You do not need IFERROR around that.
Use IFERROR only when every error should look the same. A cell that should be blank whenever the input is unusable — any error, no distinction — is the case for IFERROR. A lookup column is not that case.
Do not wrap first. Read the raw error. If it is #N/A and a miss is allowed, IFNA. If it is anything else, fix that error.
Watch out for
-
Number vs text, and a trailing space, are still
#N/A. Those are a key-mismatch, not a reason to switch toIFERROR. Confirm the miss, then wrap withIFNAonly if a miss is allowed. -
IFERRORaroundIMPORTRANGEhides the Allow access#REF!. That prompt is not a missing row. Click Allow access. Do not wrap that#REF!. -
#NAME?is a misspelled function.IFERRORwould printnonefor=VLOKUP(...). Fix the name. -
Do not wrap first. If the raw cell is anything other than
#N/A, fix that error.
Originally published on SheetError, a free library of Google Sheets error fixes (I run it).
This article was created with the help of AI.
Top comments (0)