What is the use of IfError Functions in Excel?

The IFERROR function in Excel is designed to trap and manage errors in formulas and calculations. More specifically, IFERROR checks a formula, and if it evaluates to an error, returns another value you specify; otherwise, returns the result of the formula. Where: Value (required) - what to check for errors.

  • Purpose : Trap and handle errors
  • Return value : The value you specify for error conditions.

Syntax

=IFERROR (value, value_if_error)

Arguments

  • value - The value, reference, or formula to check for an error.
  • value_if_error - The value to return if an error is found.

Example:

In the example shown, the formula in E5 copied down is:

=IFERROR(C5/D5,0)

This formula catches the #DIV/0! error that occurs when Qty is empty or zero, and replaces it with zero.