Almost certainly not.
VBA functions have overheads in:
- initialisation (overhead per function used, you can minimise this by
closing the vbe and calling calculate from VBA)
- transferring data from excel to the function and returning it. (sometimes
you can minimise this by referring tp objects rather than retrieveing an
entire range, or by getting the complete range into a vrainat in one go
rather than 'walking' across the cells)
Generally speaking VBA will always be slower than anything you can do in
native excel unless you implement a superior method in VBA.
Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com
"TheRobsterUK"
wrote in message
news:TheRobsterUK.1wajic_1128283506.0935@excelforu m-nospam.com...
Hi,
If I have a large formula in a worksheet and I create a VBA function
which replicates this (say I call it MyFunction), would this run faster
than the worksheet formula?
The function would still rely on numbers within the worksheet, but
rather than using a formula to carry out calculations it would use a
function which replicates what the formula is.
Would this improve the calculation time of the spreadsheet? If so would
it be a significant impovement?
Thanks
-Rob
--
TheRobsterUK
------------------------------------------------------------------------
TheRobsterUK's Profile:
http://www.excelforum.com/member.php...fo&userid=9924
View this thread: http://www.excelforum.com/showthread...hreadid=472454