Forum Discussion
Hershner04
Sep 22, 2021Copper Contributor
Excel Macro Runs *PAINFULLY* Slow
I have an issue running an Excel Macro. I have read a lot of threads and tried all of the suggestions but no change in performance. I have run the same file/macro on 2 machines, details below. No mat...
Hershner04
Sep 22, 2021Copper Contributor
Thank you for your consideration. I agree bad code can run poorly, but that is not the issue causing me pain.
My issue is that *the same* code and *the same* macro using *the same* dataset running on 2 different machines has disparate results. One is a 6 year old machine with half the cores/threads/RAM and an HHD, the other machine was assembled/built a little over 4 months ago and has twice as many cores/threads/RAM with an SSD. By all accounts it should run much faster but it is instead running much slower.
I know that everyone says it’s not their code, and I’m not that guy. I fully acknowledge the code is not optimized, but on my old machine it runs acceptably. On my new machine, the performance is unacceptable. Before I run down the rabbit hole of code optimization, I want to get to the bottom of the hardware/software issue that is causing my new machine to run at essentially half the speed.
As for code optimization, when I originally wrote the code 6 months ago, I did try several changes including turning off auto calculations and only running them as needed, turning off screen refresh, etc, etc.. and had very strange results there, too. My iteration time actually slowed down, so I reverted the change that made a difference (screen refresh). I have not run through the same exercise on the new machine, but I’m hesitant to do so until I address the performance issue.
My issue is that *the same* code and *the same* macro using *the same* dataset running on 2 different machines has disparate results. One is a 6 year old machine with half the cores/threads/RAM and an HHD, the other machine was assembled/built a little over 4 months ago and has twice as many cores/threads/RAM with an SSD. By all accounts it should run much faster but it is instead running much slower.
I know that everyone says it’s not their code, and I’m not that guy. I fully acknowledge the code is not optimized, but on my old machine it runs acceptably. On my new machine, the performance is unacceptable. Before I run down the rabbit hole of code optimization, I want to get to the bottom of the hardware/software issue that is causing my new machine to run at essentially half the speed.
As for code optimization, when I originally wrote the code 6 months ago, I did try several changes including turning off auto calculations and only running them as needed, turning off screen refresh, etc, etc.. and had very strange results there, too. My iteration time actually slowed down, so I reverted the change that made a difference (screen refresh). I have not run through the same exercise on the new machine, but I’m hesitant to do so until I address the performance issue.
Juliano-Petrukio
Sep 22, 2021Bronze Contributor
32 bits or 64 Bits either for Windows and Office?
VBA codes from an older Excel version or other third‐party Active Xs, you could encounter all sorts of problems. This is because many Excel add‐ons are 32‐bit versions that are not fully compatible with the 64‐bit Excel.
VBA codes from an older Excel version or other third‐party Active Xs, you could encounter all sorts of problems. This is because many Excel add‐ons are 32‐bit versions that are not fully compatible with the 64‐bit Excel.
- Hershner04Sep 22, 2021Copper ContributorThanks for your response! My older machine has always been a 64-bit OS and Office 365 packages with an iteration speed of 11 seconds. My new machine was a 64-bit OS and 32-bit Office 365 package, but I have since uninstalled the 32-bit package and installed the 64-bit version. In both situations, the iteration time was the same (24 seconds). Both Office 365 installations are 16.0.
I have not checked Active X installations but I will do that tonight.- TonyTone508Oct 29, 2021Copper Contributoryou are right Macros do run slower in general. usually you cant see what the Macro is doing. Now it seems you can pretty much watch it go play by play.
- Hershner04Oct 29, 2021Copper ContributorSo far, everyone has missed the point. The. Same. Macro.. running the. Same. Data.. on the. Same. OS. BUILD.. (i.e. Windows and Office 64-bit) runnings much, much, *MUCH* slower on the newer machine that is far superior in all regards.
I’m not looking for advice on how to run the macro more efficiently or alternative methods to macros, I’m looking for help to speed up my machine the should have run far faster out of the box.