The IFERROR function

The IFERROR function is a logical function which converts any error message from the formula within its first argument into the formula or message in its second argument. If there is no error, the first value will be the one displayed.

This is the format of the IFERROR function:

=IFERROR(FORMULA/TEXT, FORMULA/TEXT IF FIRST ARGUMENT IS AN ERROR)

Here is an example of the IFERROR function:

=IFERROR(3/0, 1) = 1 

as diving by zero resolves in an error

IFERROR function replacing an error message with a defined response

IFERROR function replacing an error message with a defined response

This function is valuable when you know that the default output for a function is an error message when it cannot be resolved. Functions like VLOOKUP or numeric operators are the ones which are most commonly attached to this type of function.

An example of a functional implementation of this would be when you are referencing secondary or tertiary lists of data through lookups, and you know that clients can only appear in one of the two lists you have. You nest multiple IFERROR functions within one another to make sure you always have the most current information about the client.

ex: the first table contains transaction from this month, and the second contains all historic data.

=IFERROR(LOOKUP FOR FIRST TABLE, LOOKUP FOR SECOND TABLE)

If there are clients who have not made purchases, you can handle this with a second IFERROR.

=IFERROR(IFERROR(LOOKUP FOR FIRST TABLE, LOOKUP FOR SECOND TABLE),”No Sales History”)