[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

IFERROR

Syntax:

IFERROR ( value , value-if-error )

Description: Provides a simpler and more efficient way of trapping and handling errors. It allows the generation of user-defined error text for a function call that can result in an error.

Arguments:

Name

Type

Description

value

any

The value that is checked for an error (i.e., any of the following: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!). If value is an empty cell, it is treated as an empty string.

value-if-error

any

The value to return if value evaluates to an error. If value-if-error is an empty cell, it is treated as an empty string.

 

Return Type and Value: any – value, if value is not an error; otherwise, value-if-error. If value is an array formula, an array of results for each cell in the range specified in value, is returned.

[Example: Consider the case in which A3 contains 55, and B3 contains 0:

A3/B3 results in #DIV/0

IFERROR(A3/B3,"Error in calculation") results in Error in calculation

end example]