Combine CHOOSE and ERROR.TYPE to display friendly error message : ERROR.TYPE « Information functions « Microsoft Office Excel 2007 Tutorial






Fill A1 with =1/0
Fill A1 with =1/0
Input the formula: =CHOOSE(ERROR.TYPE(A1),"Nothing here!","You can't divide by 0","A bad number has been entered", "The formula is referencing a bad cell or range","There is a problem with the entry","There is a problem with the entered value","Something is seriously wrong!")
Press Enter to get the result
Press Enter to get the result








17.2.ERROR.TYPE
17.2.1.ERROR.TYPE(error_val) returns a number corresponding to an error type
17.2.2.=ERROR.TYPE("#NULL!") Number of the #NULL! error=ERROR.TYPE(
17.2.3.Combine CHOOSE and ERROR.TYPE to display friendly error messageCombine CHOOSE and ERROR.TYPE to display friendly error message
17.2.4.If #NULL! or #DIV/0!, display messagesIf #NULL! or #DIV/0!, display messages