Mega Code Archive

 
Categories / MSOfficeExcel 2007 Tutorial / Information Functions
 

Combine CHOOSE and ERROR TYPE to display friendly error message

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