A lookup shows #N/A when it can't find the value. Sometimes that's the right answer (the code really isn't there) and you just want a friendlier message:
=IFNA(lookup, "Not found") replaces only #N/A.
=IFERROR(lookup, "Not found") replaces any error, which can also hide real mistakes such as a wrong column number. Prefer IFNA for lookups.
Often, though, the value is there and doesn't match. The two usual causes:
- Extra spaces: "AB-104 " with a trailing space isn't "AB-104". Wrap the lookup value in TRIM.
- Numbers stored as text: 1042 and "1042" don't match. Convert with VALUE, or with
&"" the other way.
Fix the cause first; hide the error only when "not found" is a real answer.