|
|
The Excel ISERROR Function
Basic DescriptionThe Excel Iserror function tests if an initial supplied expression (or value) returns an Excel Error, and if so, returns the logical value TRUE; Otherwise the function returns FALSE. The syntax of the function is:
ISERROR( value )
Where the supplied value argument is either a directly supplied value, a result from a formula, or a cell reference, that you want to test. Iserror Function ExamplesThe following spreadsheets show examples of the Excel Iserror function, used to determine whether a value or expression returns an error. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right.
In the examples above, the arguments to the Iserror function calls are :
For more details of the different types of Excel error messages, see the page on Excel Formula Errors. The Iserror Function In VBAThe Iserror function is also a built-in function in VBA (used for writing Excel Macros). Within VBA, the function takes exactly the same format as when used in an Excel spreadsheet: IsError( value )
For example:
After running the above 2 lines of VBA code, the variable 'A1Err' holds the value True if cell A1 of the current worksheet contains an error, and holds the value False otherwise. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Copyright © 2008-2011 ExcelFunctions.net |