The IFERROR function is one of the logical functions. It is used to check if there is an error in the formula in the first argument. The function returns the result of the formula if there is no error, or the value_if_error if there is one.
The IFERROR function syntax is:
where value and value_if_error are values entered manually or included into the cell you make reference to.
To apply the IFERROR function,
- select the cell where you wish to display the result,
- click the Insert Function icon situated at the top toolbar,
or right-click within a selected cell and select the Insert Function option from the menu,
or click the icon situated at the formula bar,
- select the Logical function group from the list,
- click the IFERROR function,
- enter the required arguments separating them by commas,
- press the Enter button.
The result will be displayed in the selected cell.
There are two arguments: value = A1/B1, value_if_error = "error", where A1 is 12, B1 is 3. The formula in the first argument does not contain any error. So the function returns the result of the calculation.
If we change the B1 value from 3 to 0, as the division by zero is not possible, the function returns error:
Return to previous page