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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,214,375
Messages
6,119,168
Members
448,870
Latest member
max_pedreira

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