Excel using 30-40% of CPU after running macro

BristolJGM

New Member
Joined
Oct 25, 2015
Messages
33
Has anyone else experienced this/ do people know what the cause is?

I have a large/ complex spreadsheet with lots of VLOOKUPs. I use a macro to produce the spreadsheet from a template (broadly, the macro takes some input data and 'works up' a template based on it).

The first time I run the macro, Excel uses 100% of CPU to calculate the workbook.

I then use the macro to 'calculate' a second workbook. Excel CPU usage then drops and it drops again if I do it with a third workbook.

What is particularly curious is that a near-identical macro run on a very similar template does not produce the same result. Even stranger, the Excel slowdown continues even if I close Excel and open a new instance of it. Excel only speeds up again if I reboot the system.

It seems peculiar that the slowdown can last even after I've closed and reopened Excel. I thought it might be some temporary file or similar - I tried using Disk Cleanup but it didn't help at all.

I can post the macro - I know people will disapprove of it as it includes use of the Select function a lot (and other things). However, a near-identical macro with a similar level of 'Select' use doesn't produce the same result on a near-identical workbook.

Can anyone help?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
The workbook in question is 36MB. The structure of the other one is very similar but it has more data and is 120MB.
(In other words - it is actually the smaller workbook that this is happening with).

I was wondering if it was something about the structure of the workbook so I've tried to make it as similar as possible to the other workbook, but with no success.

I can't share the workbooks - they are confidential.

To add to the confusion - the workbook will consistently get 100% CPU usage on my older Microsoft i5 computer (8 cores). On my current computer (AMD 5950x 16 cores) it initially gets 100% CPU usage but this drops after running the macro too often.
 
Upvote 0
Frustrating. I was hoping other issues were with main (slower) book... Given the file sizes that's an unexpected result
 
Upvote 0
In principle, what could there possibly be that causes a CPU slowdown which endures after Excel has been closed and re-opened?

As in - I open a file, it uses 100% CPU, but eventually drops to 40% for the reasons above. Close Excel, run disk cleanup to remove any temporary files, re-open the exact same file and 40% CPU usage.

Reboot Windows and it goes back to 100%.

And this only happens on an AMD computer rather than an Intel one. Something about how a 16 core AMD computer interacts with Windows compared to an 8 core Intel one?

It is admittedly a complex workbook (can't share it for confidentiality reasons).
 
Upvote 0
Bumping in hope someone can help. I haven't had this experience before, if anything when there is alot of strain it just gets worse
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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