IFERROR Function
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:
IFERROR(value, value_if_error,)
where value and value_if_error are values entered manually or included into the cell you make reference to.
How to use IFERROR
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.
For example:
You have a list of available item stock and its overall value. To learn unit price, we will use the IFERROR function to see if there are any errors. The arguments are as follows: value = B2/A2, value_if_error = "Out of stock". The formula in the first argument does not contain any errors for cells C2:C9 and C11:C14 so the function returns the result of the calculation. However, it is the opposite for C10 and C11 since the formula tries to divide by zero, hence, we get "Out of stock" as a result.

Return to previous page