Worksheetfunction vs UDF
Posted on February 23, 2008 by dougaj4
The previous post provided VBA code for a number of trigonometric functions, most of which are already available in Excel. Why bother you may say, why not just use the WorksheetFunction object? The numbers below provide the answer:
| Time to calculate ATan2() 65,536 x 16 times | ||
|
XL2007 |
XL2000 |
|
| VBA ATn2() |
1.60 |
1.21 |
|
Worksheetfunction |
14.20 |
3.06 |
With Excel 2007 using a UDF in preference to Worksheetfunction gives a speed improvement of almost 10 times. With Excel 2000 the difference is not so dramatic, but still a worthwhile 2.5 times improvement.
Filed under: Excel, UDFs | Tagged: Excel 2007 performance
Being picky -
But not for spellers: An Excel blog for engineers and scientists, and an ->egineering<- and science blog for Excel users.
mrt - OK, fixed.
And congratulations on getting the first comment in
Hi Doug -
I followed the link here from Daily Dose of Excel, and I’ll be back, for I’m definitely not one of those $$$ guys.
I really like your concept.
…mrt
[...] Worksheetfunction vs UDF [...]
[...] Worksheetfunction vs UDF - 2 Filed under: Excel, UDFs — Tags: Excel 2007 performance, UDF, Worksheetfunction — dougaj4 @ 1:24 pm Previous Post [...]