ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IFERROR (https://www.excelbanter.com/excel-worksheet-functions/202403-iferror.html)

MMCBRIDE

IFERROR
 
Why would I ever need this function?

Sheeloo

IFERROR
 
If you are human just like us, sooner or later you will make an errort and
will need this function...

Seriously, ISERROR is used to suppress or take an alternate action if the
formula being tried generates and error. It is also used when many functions
are used together to build a large one. If any piece retruns an error the
whole fails. By testing for ISERROR one can recover from such situations.

"MMCBRIDE" wrote:

Why would I ever need this function?


Harlan Grove[_2_]

IFERROR
 
MMCBRIDE wrote...
Why would I ever need this function?


'Need'? Never. However, IFERROR could be efficient and convenient.
Formulas like

=IF(ISERROR(VLOOKUP(a,Table,n,0)),a&" not found in
table",VLOOKUP(a,Table,n,0))

in Excel 2003 and prior could be rewritten as

=IFERROR(VLOOKUP(a,Table,n,0)),a&" not found in table")

in Excel 2007.

Peo Sjoblom[_2_]

IFERROR
 
IFERROR is one of the few improvements between 2003 and 2007 IMHO.

Let's say we have a formula that returns an error and one of the most common
methods to deal with this is

=IF(ISERROR(formula),0,formula)

remember that the word formula here can be the equivalent of a gigantic
formula thus making the above example a monstrosity, first the IF, then
ISERROR, then the long formula, then what we want if it's an error and
finally the same long formula again.

Using IFERROR it will look like


=IFERROR(formula,0)


so we save the IF and 1 formula string plus 2 function calls which is
actually very good.

--


Regards,


Peo Sjoblom

"Sheeloo" wrote in message
...
If you are human just like us, sooner or later you will make an errort and
will need this function...

Seriously, ISERROR is used to suppress or take an alternate action if the
formula being tried generates and error. It is also used when many
functions
are used together to build a large one. If any piece retruns an error the
whole fails. By testing for ISERROR one can recover from such situations.

"MMCBRIDE" wrote:

Why would I ever need this function?





All times are GMT +1. The time now is 04:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com