Logiceasy
IFNA()
Returns the first argument unless it is the #N/A error, in which case returns the second.
Syntax
fx
=IFNA(value, value_if_na)
Arguments
Example
fx
=IFNA(VLOOKUP("X", A:B, 2, FALSE), "Not found")
Paste this into Google Sheets to run it. The live playground on this site covers 24 of the 61 functions, and IFNA isn't one of them yet.
Common pitfalls
- Catches only the
#N/Aerror; other errors (#REF!,#VALUE!,#DIV/0!) still bubble up. That's usually what you want. - Most useful right around lookup formulas like
VLOOKUP/XLOOKUP/MATCHwhere#N/Ameans "not found" rather than a real bug.
Related formulas
Used by