Forum Discussion
Macros suddenly run much slower
I've run into the same issue. Macros that used to take ~5 minutes to complete now take hours. I've instrumented my code and it appears that the slowdown is primarily related to copying data between cells. Turning off autocalculation has not yielded improvement.
- felixvsFeb 19, 2022Copper ContributorPlease check the comment from CliveW85 in the post below, this has solved the problem for many users:
https://techcommunity.microsoft.com/t5/excel/excel-macro-runs-painfully-slow/m-p/3180940/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufEtaUkRaNzhDWjVIRTZEfDMxODA5NDB8U1VCU0NSSVBUSU9OU3xoSw#M134966- Steve_PigsoftFeb 19, 2022Copper Contributor
Thanks: To confirm, the fix for Slow macros/ Slow exit from Excel once slow macros with Excel 365 have run suggested...
(by @CliveW85 in Post: https://techcommunity.microsoft.com/t5/excel/excel-macro-runs-painfully-slow/m-p/3180940/emcs_t/S2h8... )
....did work for me 100% (as per my previous entry under that Topic, posted: Feb 17 2022 01:33 PM)
CliveW85’s fix that works is as follows:
To restore normal ‘at-speed’ Excel 365 macro running again, even with most current Windows 365 versions of Excel – ‘Add the directories of the Excel file(s) with the macro(s) within as Excel Trusted Locations’.
To do this:
From the Excel ribbon, follow this path:
Developer > Macro Security >Trusted Location(s) and then add those new trusted locations that contain your Excel files - e.g., for me: I added “V:\Datatree\ExcelData\WORK\” and its subdirectories.
((*) If the Developer function is not available in the top ribbon of your Excel 365, add it via Excel>Options>Customise Ribbon> then select Developer, OK.)
(To be certain of a fix, not only did I add the directories which contained the Excel files(s) that contained the macro(s) within, but also the directories for any locations where my macros accessed data from. e.g., for me - F:\Datatree\CLP Project\ and its subdirectories.).)
After these actions, macros then run at a good speed once more, and exiting from Excel after running the macros is restored to being swift, too.
It would seem that up until recent (2022) updates to Microsoft 365 (Excel 365), listing Trusted Locations within Excel>Developer was not an essential requirement for running Macros at a reasonable speed, and now it is.
- kriteesaksenaJun 24, 2022Copper ContributorWe also saw same issue with macro enabled excel , tried the work around by adding location to trusted where this excel resides in my machine. But still seeing issue with performance.
The performance was netter about a week ago and since last week we started seeing issue.
Is there anything else we can try to fix the issue.