Using the Excel IFERROR Function


Excel's IFERROR function is used to trap and handle errors in a formula. The function will return a user specified value if a formula results in an error. If no error is found, then the formula will execute as normal and the result will be returned. IFERROR will work to catch any error. If you are looking for a function that only traps the #N/A error, then IFNA will be useful.


=IFERROR(value, value_if_error)

Syntax Breakdown

Value is a required field and is the argument that checks for any errors.

Value_if_error is also required and is the user specified value that should be returned if the formula returns an error. The following are the errors that the function will check for: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, and #NULL!.

Usage Notes

Blank Cells
If the input for value or value_if_error is a blank or empty cell the IFERROR function will treat this as an empty string value ("").

Array Formulas
If the value argument is an array formula the IFERROR function will return an array of results for each cell in the specified range.

Targeting #N/A Errors
If you are only interested in targeting #N/A errors, you can use the IFNA function in Excel versions 2013 and newer.