IFERROR(value, value_if_error)

Returns the value based on an error condition you specify.

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

Remarks

* Added in Excel 2007.
* In Excel 2003 you could achieve the same result by using a combination of the IF and ISERROR functions.
* The following types of errors are identified: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? and #NULL!.
* 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 IFERROR - User Defined Function if you want to use a VBA function instead.
* For the Microsoft documentation refer to support.office.com

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

1 - #DIV/0! (division by zero)
2 - #NAME? (named range does not exist)

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