Formualizer Docs

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

ArgumentTypeRequiredDefault
valueanyRequired—
value_if_naanyRequired—

Remarks

  • Only #N/A triggers fallback.
  • Other error kinds are returned unchanged.
  • Non-error results pass through unchanged.
  • When the first argument is an array or range, each #N/A element is replaced by the matching element of the fallback, with the same pairing, laziness, and size rules as IFERROR; 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?.

FAQ

Which errors does IFNA intercept?

Only #N/A is intercepted; all other errors pass through unchanged, including inside arrays.

Implementation

Engine source

On this page