IFERROR

IFERROR(value, value_if_error)

Returns the value or something else if it evaluates to an error.

valueThe expression you want to check.
value_if_errorThe value to return when "value" evaluates to an error.

REMARKS
* Added in Excel 2007.
* You can use the ISERROR function to return True or False depending if the value is an error.
* The following types of errors are identified: #DIV/0!, #N/A, #NAME?, #NULL!, #NUM!, #REF! and #VALUE!.
* This function is often used to trap and handle errors returned from lookup functions.
* If "value" is empty, then "" is used.
* If "value" evaluates to #NULL! then "value_if_error" is returned.
* If "value_if_error" is empty, then empty string is used.
* You can use the IF function to return the value based on whether a certain condition is True or False.
* You can use the IFS function to returns the value based on multiple True or False conditions.
* You can use the IFNA function to return the value True or False depending if the value is #N/A.
* You can use the ISNA function to return True or False depending if the value is #N/A.
* For the Microsoft documentation refer to support.microsoft.com

 AB
1=ISERROR(B1) = True=10/0 = #DIV/0!
2=IF(ISERROR(B1),"error value",B1) = error value 
3=IFERROR(B1,"error value") = error value 
4=IFERROR(#DIV/0!,"error value") = error value 
5=IFERROR(#N/A,"error value") = error value 
6=IFERROR(#NAME?,"error value") = error value 
7=IFERROR(#NULL!,"error value") = error value 
8=IFERROR(#NUM!,"error value") = error value 
9=IFERROR(#REF!,"error value") = error value 
10=IFERROR(#VALUE!,"error value") = error value 
11=IFERROR("something","error value") = something 
12=IFERROR(10/0,"error value") = error value 
13=IFERROR(invalid_namedrange,"error") = error value 

1 - Does the formula in "B1" return an error. If it does return "error value" and if not then return the value.
2 - Does the formula in "B1" return an error. If it does return "error value" and if not then return the value.
3 - Does a formula that returns #DIV/0! get identified as an error.
4 - Does #DIV/0! get identified as an error.
5 - Does #N/A get identified as an error.
6 - Does #NUM! get identified as an error.
7 - Does #NAME? get identified as an error.
8 - Does #NULL! get identified as an error.
9 - Does #REF! get identified as an error.
10 - Does #VALUE! get identified as an error.
11 - Does a text string get identified as an error.
12 - Does an expression that evaluates to division by zero get identified as an error.
13 - Does an invalid named range get identified as an error.

© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited Top