IFERROR Excel Formula - Accountant Excel

Latest

BANNER 728X90

Saturday, 19 March 2016

IFERROR Excel Formula

Introduced since Excel 2007, IFERROR() formula checks a formula (or expression) and returns the value of formula if there is no error, otherwise a custom formula.
Syntax: 
=IFERROR (value, value_if_error)

The IFERROR function syntax has the following arguments:

  • Value    Required. The argument that is checked for an error.

  • Value_if_error    Required. The value to return if the formula evaluates to an error. The following error types are evaluated: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!.

For eg:
=IFERROR(1/0,"Try splitting an atom instead!")
will give the message Try splitting an atom instead! because the expression 1/0 returns an error (DIV/0 error)
Where as,
=IFERROR(0/1,"Try splitting an atom instead!")
will give the value 0 since 0 divided by 1 is 0.

flow chart of IFERROR function


Please note that IFERROR is oblivious to the type of error. That means, no matter what the error is (DIV/0, #NAME, #N/A, #REF… etc.), IFERROR treats all of them equally and shows the same value. In other words, IFERROR is like “Catch all” in programming world.

Notes:
  • If value is empty, it is evaluated as an empty string ("") and not an error.
  • If value_if_error is supplied as an empty string (""), no message is displayed when an error is detected.
  • If IFERROR is entered as an array formula, it returns an array of results with one item for each cell in value.

No comments:

Post a Comment