If(iserror

StrideExcel

New Member
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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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.

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!

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``````

Replies
15
Views
527
Replies
0
Views
191
Replies
4
Views
333
Replies
5
Views
160
Replies
2
Views
256

1,219,519
Messages
6,148,748
Members
450,833
Latest member
Andyboi

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?

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

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