IFERROR (return a value upon encountering error)

<< Click to Display Table of Contents >>

IFERROR (return a value upon encountering error)

Syntax:

IFERROR(Value, ValueIfError)

Description:

Normally returns Value. However, if Value contains any type of error value, 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 by their last result as a fixed value.

Accordingly, if you 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 it does, the text string "Error!" is returned instead.

See also:

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