IFERROR Efficiency...

jmwbowen

Board Regular
Joined
Jul 27, 2012
Messages
58
This is a technical question about IFERROR.

I have a few formulas that depend on particular cells to contain data to function correctly. A lack of any data in those cells will result in an error value.

Previously, I trapped these errors using the following method:
Code:
=IF(ISBLANK(D3),"",formula)

I've now changed them to the following:
Code:
=IFERROR(formula,"")

These formulas are repeated MANY times down a column.

I do not know the exact order of operations within the IFERROR function, so I can't be sure which is faster. I am guessing the following:
The first example using the IF function must first evaluate the ISBLANK condition. If result is FALSE, then it evaluates the formula.​

Does IFERROR do one of the following?:
a. Evaluate formula for error. If no error, re-evaluate formula and give result.

b. Evaluate formula, store result in memory. If error, go to error portion, if NOT error, retrieve result from memory.​

With respect only to speed and efficiency, which way is better?

Thanks in advance,

Jason
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
IFERROR does option b. I don't think you would see much, if any, efficiency improvement over your original formula by using IFERROR. It really comes into its own for formulas that are repeated, such as a typical VLOOKUP error handler:
=IF(ISERROR(VLOOKUP(....)),"Error",VLOOKUP(...))
where the VLOOKUP part was actually executed twice for any non-error results. Your formula has a fairly inexpensive data check to avoid the error.
 
Upvote 0
Thanks for the reply, Rory. I've been on an efficiency quest with this workbook since the end user is using an older computer and every little bit helps.
 
Upvote 0
IFERROR should really only be used on small data sets. Anything that is using a large data set (2000 rows+) i would use a logical test beforehand - speeds up calculation
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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