In this post, let’s learn about IFERROR function in depth in Microsoft Excel and see with an example on how use it with-in your Excel spreadsheet.
This function is used to detect and handle errors in Excel.
IFError in Excel
The IfError finds errors in a formula and gives out the alternative result of the formula if an error occurs.
In case no error occurs in the formula then the function returns a different result. IfError is an easy way to find and handle the errors in a formula.
Syntax – IFERROR(normal_value, value_if_error)
Note: If no argument is passed for normal_value then it is considered as empty and not incomplete, the same applies for value_if_error.
As mentioned above this function works in such a way that when an error is encountered it displays the value you’ve passed as an argument and if not it displays the other value you’ve passed.
IfError usually check for errors such as #N/A, #VALUE!, #REF!, #DIV/0, #NUM!, #NAME?, #NULL!.
Let’s take a look at few examples.
Here the formula of SUM is correct so no error occurs and the value is displayed as of the formula.
In this case, an error occurs as A2 doesn’t contain any value so the alternative value gets displayed.
This is a special case as mentioned above if you notice the function as an empty argument for the value of value_if_error. The function returns the value of SUM as it is correct. Now take a look at the example below.
Here the formula returns nothing as an error occurs so it returns the value_if_error which is empty.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.