This article describes the formula syntax and usage of the IFERROR function (function: A prewritten formula that takes a value or values, performs an operation, and returns a value or values. Use functions to simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex calculations.) in Microsoft Excel.
Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula. Use the IFERROR function to trap and handle errors in a formula (formula: A sequence of values, cell references, names, functions, or operators in a cell that together produce a new value. A formula always begins with an equal sign (=).).
The IFERROR function syntax has the following arguments (argument: A value that provides information to an action, an event, a method, a property, a function, or a procedure.):
- Value Required. The argument that is checked for an error.
- Value_if_error Required. The value to return if the formula evaluates to an error. The following error types are evaluated: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!.
- If Value or Value_if_error is an empty cell, IFERROR treats it as an empty string value ("").
- If Value is an array formula, IFERROR returns an array of results for each cell in the range specified in value. See the second example below.
The workbook below shows examples of this function. Inspect them, change existing formulas, or enter your own formulas to learn how the function works.
To work more in-depth with the example data in Excel, download the embedded workbook to your computer, and then open it in Excel.