How to Fix Excel 365 64-Bit Running Slow During VBA Code Execution
Question details
The user is experiencing severe performance degradation and progressive slowdowns when running VBA macros after migrating from Excel 32-bit to Microsoft 365 64-bit.

- Product
- Excel 365 64-Bit
- Device & OS
- not provided
- Scenario
- Running legacy VBA code, particularly with loops containing WorksheetFunction calls or basic computations, causing significant UI freezing.
- Observed behavior
- Cell entry and workbook closing can take several minutes. The issue progressively worsens during execution, making the 64-bit version perform much worse than the older 32-bit version despite basic hardware troubleshooting.
Before troubleshooting and modifying your scripts, ensure you have a backup copy of your macro-enabled workbook (.xlsm) to prevent any accidental data loss.
Replace VBA Loops with Worksheet Formulas
Shift heavy calculations from VBA iterations to Excel's native formula engine to significantly reduce 64-bit execution overhead.
Calling WorksheetFunction.SumIfs or CountIfs repeatedly inside VBA For/Next loops is known to cause severe performance degradation in Excel 365 64-bit. Excel's calculation grid is highly optimized for mass calculations, making it much faster than VBA's line-by-line processing.
Open the VBA Editor (ALT + F11) and locate any For/Next loops in your code that perform repetitive basic computations or WorksheetFunction calls.
Modify the macro to stop calculating row-by-row. Instead, write a VBA command to copy a single template row containing the necessary Excel formulas and paste it across your target range.
Use the Application.Calculate method in your code to trigger the worksheet calculation, then have VBA copy the formula range and paste it as values to finalize the process and clear memory.

Update VBA Declarations for 64-Bit Compatibility
Modify 32-bit legacy VBA code to use 64-bit compatible data types to prevent memory mismanagement and execution delays.
Isolate Conflicts with a Clean Environment
Ensure that third-party add-ins or corrupted preferences are not exacerbating the VBA performance issue.
Switch to WPS Office for a Faster, Lightweight Spreadsheet Experience
If Microsoft Excel's 64-bit architecture continues to cause slow execution or high resource usage, consider switching to WPS Office. It provides a lightweight, highly compatible alternative that effortlessly handles standard spreadsheet operations without the heavy overhead.

Frequently Asked Questions
Why is my VBA code running slower in Excel 64-bit compared to 32-bit?
Excel 64-bit handles larger amounts of data and memory, but this architecture can introduce communication overhead between VBA and the Excel grid. Legacy code with poorly optimized loops or frequent WorksheetFunction calls will often run noticeably slower than in the more forgiving 32-bit version.
Do I need to rewrite all my legacy macros for Excel 365 64-bit?
No, you do not need to rewrite everything from scratch. However, you must update API declarations using PtrSafe and LongPtr. Additionally, heavy computational loops may need to be offloaded to standard worksheet formulas to restore normal execution speed.
Can standard troubleshooting fix 64-bit VBA slowdowns?
While clean booting, disabling add-ins, and removing references like Acrobat Distiller are good first steps to rule out software conflicts, they often do not resolve architecture-specific VBA slowdowns. Optimizing the VBA code structure itself is usually the required solution.




