Iferror, 159 iferror – Apple iWork '09 User Manual
Page 159
Chapter 7
Logical and Information Functions
159
Related Topics
For related functions and additional information, see:
“Specifying Conditions and Using Wildcards” on page 360
“Trapping Division by Zero” on page 360
“Adding Comments Based on Cell Contents” on page 358
“Using Logical and Information Functions Together” on page 358
“Listing of Logical and Information Functions” on page 155
“Value Types” on page 36
“The Elements of Formulas” on page 15
“Using the Keyboard and Mouse to Create and Edit Formulas” on page 26
“Pasting from Examples in Help” on page 41
IFERROR
The IFERROR function returns a value that you specify if a given value evaluates to an
error; otherwise it returns the given value.
IFERROR(any-expression, if-error)
Â
any-expression: An expression to be tested. any-expression can contain any value
type.
Â
if-error: The value returned if any-expression evaluates to an error. if-error can
contain any value type.
Usage Notes
Use IFERROR to handle errors in a formula. For example, if you are working with
Â
data where a valid value for cell D1 is 0, the formula =B1/D1 would result in an
error (division by zero). This error can be prevented by using a formula such as
=IFERROR(B1/D1, 0) which returns the actual division if D1 is not zero; otherwise it
returns 0.