[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Excel UDF slow - can add-in speed things up?

Posted on 2010-08-26
4
Medium Priority
?
674 Views
Last Modified: 2013-12-17
Hi,
I have a complex excel workbook with quit some sheets (over 20) with lots of data on it (lets say 30 ranges of 100x100 cells per sheet).
In that workbook there are also a huge amount of formulas that mostly do vlookups, indexes and matches and some ordanary +-*/ calculations. Those formulas are often very complex (4 to 5 lines in the formula bar) so we had to put them in UDF's for readability and to keep things manageable. Which works very nice.
There is only one downside to this workbook: Calculating all formulas can take up to 5 minutes. And because a lot of formulas are linked to one another, we cannot just calculate one sheet but need to do a full calculation.

My question: is there a way to speed up all those UDF's?
I have searced the internet and found quit some stuff to speed things up but it never gives me the complete answer.
One thing that comes back every time is that native Excel functions are much faster than UDF.

So do I have to look for xll, COM/Automation add-in's or are UDF's in VBA still faster?

I have tried xll and COM/Automation add-in's but didn't find a solution yet.
As I mentioned, the formulas do a lot of lookup work so I'm guessing it would be best if I could use the Excel built-in lookup functions as they are quit fast.
But  so far I haven't succeeded in making the Excel Built-in functions work within an xll or COM/Automation add-in.

Any workable help or good ideas would be very much appreciated.

ps: Could "Add-in Express 2010 for Microsoft Office and .net"  do the job? Can't try that one as there is no trial version available...
0
Comment
Question by:Emenizer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 2000 total points
ID: 33538009
You might consider looking at the code developed by William Hooper to speed up VLOOKUP functions. He replaces those functions with alternatives that eliminate the dependency on entire columns or rows. VLOOKUP updates every time anything changes in its reference table. Hooper's functions update only when the specific cell you care about is changed.

The unfortunate part is the fact that Hooper's web page has been defunct for several years. You can use the Internet Time Machine to access it, however. http://web.archive.org/web/20041207214923/http://www.whooper.co.uk/excelstuff.htm 

You'll need the code in a .xll (not one of the file formats I can post on Experts Exchange) and a .xla  There is a link at the bottom of Hooper's web page that lets you download it. Please post if you have difficulty--I do have a copy.

Brad
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 33538066
Emenizer,Ceteris paribus, native Excel functions will be faster than VBA UDFs, and even complex formulas that rely only on native functions will tend to be faster than UDFs.That said, xll UDFs should run faster than VBA UDFs, but it's still unlikely that they will run as fast as native functions.Brad gave you some great stuff there.  About all that I can add to it:1) Try to avoid array formulas if you can, even if it means using "helper columns".  Having a few thousand array formulas is a great way to slow your workbook to a crawl2) Some Experts here say that under some circumstances, INDEX/MATCH can be faster than VLOOKUPPatrick
0
 
LVL 3

Author Comment

by:Emenizer
ID: 33562976
@byundt: an interessting article! But the link to the zip on there isn't working anymore. You wouldn't have that one anymore, would you?
0
 
LVL 81

Expert Comment

by:byundt
ID: 33563555
Emenizer,
Try downloading that file here: https://filedb.experts-exchange.com/incoming/ee-stuff/7981-whooper.zip

Brad
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question