Articles with the tag:
Articles with the tag:
Try in the cloud

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,

  1. select the cell where you wish to display the result,
  2. 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,
  3. select the Logical function group from the list,
  4. click the IFERROR function,
  5. enter the required arguments separating them by commas,
  6. 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.

IFERROR Function: if error

Return to previous page
Try now for free Try and make your decision No need to install anything
to see all the features in action