If(iserror

StrideExcel

New Member
Joined
Jan 28, 2008
Messages
13
Just curious what the difference is between the following formulas:

if(iserror(
iferror(
if(isna(

they seem to return the same result


Thanks
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
The first 2 will return the same results, but you only need to use the formula you are checking once. Like:

=if(iserror(vlookup(A1,B:D,3,0)),0,vlookup(A1,B:D,3,0))

but with iferror it is much shorter:

=iferror(vlookup(A1,B:D,3,0),0)

So I would assume the latter would calculate quicker, but is only available in XL2007.

=if(isna( is like the first one, but will only check for a #N/A error and will not work for #VALUE, #NUM, #DIV/0 and #NAME?.

Hope that helps.
 
Upvote 0
Dear StrideExcel,

ISERR checks for: #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, #NULL
ISERROR checks for: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, #NULL
ISNA checks for: #N/A

And as schielrn said, IFERROR is a great new function in Excel 2007 that is shorter to type and calculates much faster in some large formulas!
 
Upvote 0
IFERROR can be added to earlier versions of Excel with a UDF, if you're interested or in need.

Code:
Function IFERROR(ToEvaluate As Variant, Default As Variant) As Variant
    If IsArray(ToEvaluate) Then
        IFERROR = IIf(IsError(ToEvaluate(1)), Default, ToEvaluate)
    Else
        IFERROR = IIf(IsError(ToEvaluate), Default, ToEvaluate)
    End If
End Function
 
Upvote 0

Forum statistics

Threads
1,213,492
Messages
6,113,967
Members
448,537
Latest member
Et_Cetera

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top