Excel – Huge Excel spreadsheet taking too long to update links or calculate formulae

microsoft excel

I have an Excel spreadsheet with 5000 rows and columns till AY (size 12MB). Except for the first six columns, the rest contain either vlookups or other formulae. All the vlookups are in a separate Excel worksheet. I have changed the Excel setting to manually update the links and calculate formulae. Now every time I try to update the links, either Excel hangs or it takes something like 15 minutes.

Right now I am working on splitting the worksheet into four instances; where I will update four different Excel sheets in sequence. But it requires manually copying index columns to next stage. It takes 3-4 hours to update the links. Yesterday I started getting error messages that:

Excel does not enough resources to complete the operation.

I was left with no choice, but to split the entire operation into four small steps requiring manual intervention.

I looked at INDEX. Not really applicable on my case. Any ideas on how I can get it done quickly?

Best Answer

5000 rows by 50 columns is not a large worksheet. 12MB is a perfectly reasonable small-to medium file size and you should have no need to do anything so drastic as reworking to a database or something similar.

From your description, the problem appears to be the links. How large are the referenced workbooks? Are they recalculating when you link to them? I like the pre-opening idea: you can see what's happening then.

Is your memory usage (look at Task Manager) exceeding your available physical RAM? Once memory has to be swapped out to disk, things start to slow down a lot.

Beyond the pre-opening and sorting help, I'd suggest taking a look at the non-lookup formulae: can any be converted into array formulae and called once per calculation instead of once per row?

On the VLOOKUP thing: have you tried using INDEX(value_range, MATCH(lookup_key, key_range))? There are situations where it's faster.

You don't say if you have any VBA. If you do, look at how many times VBA functions are called and how much time they take. VBA code that makes a lot of reference to Excel objects can be expensive.

Related Question