IFNA
Returns a fallback only when the first expression is #N/A.
IFNA(value, value_if_na) is narrower than IFERROR.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=IFNA(value, value_if_na)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
value | any | Required | — |
value_if_na | any | Required | — |
Remarks
- Only
#N/Atriggers fallback. - Other error kinds are returned unchanged.
- Non-error results pass through unchanged.
- When the first argument is an array or range, each
#N/Aelement is replaced by the matching element of the fallback, with the same pairing, laziness, and size rules asIFERROR; other elements, including other error kinds, pass through. - Evaluation failures of the first argument are not caught.
Error cases
- Exactly two arguments are required; other arities return
#VALUE!.
Examples
Replace a missing-value error with a readable fallback.
Formula =IFNA(NA(),"Unavailable")
Expected result Unavailable
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Preserve a numeric input when there is no error to replace.
Formula =IFNA(42,"Unavailable")
Expected result 42
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A zero result is a valid value and does not need the fallback.
Formula =IFNA(0,"Unavailable")
Expected result 0
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
An error in the fallback becomes the formula result.
Formula =IFNA(NA(),1/0)
Expected result #DIV/0!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Catch N/A
Formula =IFNA(NA(), "missing")
Expected result missing
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Do not catch other errors
Formula =IFNA(1/0, "missing")
Expected result #DIV/0!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Which errors does IFNA intercept?
Only #N/A is intercepted; all other errors pass through unchanged, including inside arrays.