Excel IFERROR function
The IFERROR function checks if the value of a cell returns and error, if an error is present a predefined value is returned.
=IFERROR(function if no error, function if error)
In the above example the third column shows the results of the non-corrected formula B3/C3. Cells D11, D12, D16 and D17 all return the #DIV/0! error because the function is trying to divide by zero.
Column 4 shows the corrected value if an IFERROR function is used.
This formula returns “∞” if an error is present in the cell upon the action of the B3/C3.
A further expansion of IFERROR is to nest it with other functions.
In the above example the VLOOKUP() function returns an error as the cell it looks at has a #DIV/0! Error. Once the VLOOKUP() is nested inside an IFERROR we can force an error to be replaced by a predescribed value, in this case a “0”.