How can we help you?

The IFERROR function returns the validated value if it does not contain an error, otherwise returns the second argument.

This function is useful for replacing error messages with more informative values.

 

Syntax

IFERROR(value_to_validate, value_if_error)

Argument

Description

Permitted values

value_to_validate

The value that will be returned if it does not contain an error

Formula, function or cell reference

value_if_error

The value that will be returned if the “value_to_validate” argument contains an error

Any value (number, text, and so forth)

 

Examples of use

Processing division by zero

=IFERROR(A1/B1, "Error: Division by zero")

If B1 equals 0, the formula will return “Error: Division by zero”; otherwise, it will divide A1 by B1.

Verification of the result of the VLOOKUP function calculation

=IFERROR(VLOOKUP(D1, A1:B10, 2, FALSE), "Not found")

If the value from cell D1 is not found in the range A1:B10, the function will return “Not found.”

Addition with error processing

=IFERROR(A1+A2, “Addition error”)

If an error occurs during addition (for example, if A1 or A2 contain text), the message “Addition error” will be returned.

 

Notes

The IFERROR function processes all types of errors: #N/A, #VALUE!, #DIV/0!, #NUM!, #NAME?, #REF!.

To process only certain types of errors, you can use the IF function in combination with IFERROR.

It is not recommended to use the function to hide all errors without analyzing their causes.

Was this helpful?
Yes
No
Next
IFNA