IFERROR (return a value if error)

<< Click to Display Table of Contents >>

IFERROR (return a value if error)

Syntax:

IFERROR(Value, ValueIfError)

Description:

This normally returns Value. If Value contains any type of error value, however, the defined ValueIfError is returned instead.

Compatibility notes:

This function is not supported by the .xls file format (used in Microsoft Excel 2003 and earlier). If you save a document in this format, all calculations using this function will be replaced with their current result as a fixed value.

If you want to use this function, you should not save your document in the "Microsoft Excel 97-2003 (.xls)" file format, but choose one of the following formats instead:

"PlanMaker document (.pmdx or .pmd)"

or: "Microsoft Excel 2007-2021 (.xlsx)"

Example:

IFERROR(A1, "Error!") returns the value in cell A1, as long as A1 doesn't contain an error value. If there is an error value in this cell, however, the text string "Error!" is returned instead.

See also:

IFNA, ISERR, ISERROR, ISNA, ERROR.TYPE, section Error values