IFERROR / IFNA

IFERROR returns a specified value when a formula produces any error. IFNA returns a specified value only for #N/A errors, letting other errors surface. Always wrap lookup formulas in one of these.

Syntax

excel-mastery
=IFERROR(value, value_if_error)
=IFNA(value, value_if_na)

Example

excel-mastery
=IFERROR(VLOOKUP(A2, Table, 2, FALSE), "Not Found")

=IFNA(XLOOKUP(A2, Codes, Labels), "Unknown Code")