The Excel IFERROR FunctionSearch this site:
Custom Search
The Excel IFERROR function tests if an initial supplied value (or expression) returns an Excel Error, and if so, returns a second supplied argument; Otherwise the function returns the initial supplied value. The IFERROR function is new to Excel 2007, so is not available in earlier versions of MS Excel The format of the function is: IFERROR( Value, Value_if_Error )
where the arguments are as follows:
I personally have found the Excel Iferror function to be a useful addition in Excel 2007. Previously, in Excel 2003, whenever I used the Vlookup function I would frequently also use the If function with the Iserror function to test for an error and return an appropriate result. This is shown in the following formula:
IF( ISERROR(VLOOKUP(...)), "", VLOOKUP(...) )
the above formula checks if the Vlookup function returns an error, and if so, returns a blank (""). Otherwise the value of the Vlookup is returned. Although this formula is long and inefficient (as it requires 2 seperate calls to the Vlookup function), it helps to keep my spreadsheet cells tidy and free from messy error messages. In Excel 2007, I can perform the above action much more efficiently and neatly, by using the Iferror function. The new formula is written as:
IFERROR( VLOOKUP(...), "" )
Further ExampleAn example of using the Excel Iferror function within conditional formatting, to hide errors, can be viewed on the Microsoft Support website. |
||||||||
|
|
||||||||
Copyright © 2008-2010 ExcelFunctions.net |