How to Fix Excel 365 Crashes Caused by Volatile VBA UDFs
Question details
The user is experiencing application crashes in Excel 365 when using a volatile VBA macro within conditional formatting.

- Product
- Microsoft Excel 365
- Device & OS
- not provided
- Scenario
- Using a volatile VBA user-defined function (UDF) in conditional formatting to identify cells containing comments after a software update.
- Observed behavior
- The Excel 365 workbook crashes unexpectedly, likely due to a bug introduced in a recent update concerning volatile functions and conditional formatting.
Before applying any fixes, open Excel in Safe Mode to safely back up your workbook without triggering the volatile function and causing a crash.
Disable the Volatile UDF in Conditional Formatting
Temporarily removing or disabling the conditional formatting rule that relies on the volatile UDF will prevent the crash until Microsoft releases a patch.
Volatile functions recalculate every time any change is made in the workbook. When combined with conditional formatting, this can trigger excessive recalculations and overwhelm Excel's memory, especially if a recent update introduced a bug.
Press the Windows key + R, type 'excel /safe', and press Enter. This opens Excel without running macros or add-ins, preventing the crash.
Go to File > Open and select the workbook that has been crashing.
Navigate to the Home tab on the ribbon, click on 'Conditional Formatting', and select 'Manage Rules' from the dropdown menu.
Locate the rule that uses your volatile VBA UDF. Select it and click 'Delete Rule', or edit it to remove the reliance on the UDF. Click 'Apply' and then 'OK'.
Save your workbook and restart Excel normally to verify that the crashing has stopped.

Report the Issue and Seek Community Help
Since this crash appears to be triggered by an Excel 365 update, reporting the exact scenario to Microsoft accelerates a bug fix.
Try WPS Office for a Stable Spreadsheet Experience
If Microsoft Excel continues to crash due to recent updates or macro-heavy workbooks, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for your spreadsheet tasks, often avoiding the complex instability found in bloated software updates.
- 1. Download WPS Office: Visit the official WPS website and download the free installer for your operating system.
- 2. Install and Launch: Run the installer and follow the prompts. Once installed, open WPS Spreadsheets.
- 3. Open Your Excel File: Click 'Open' and select your .xlsx or .xlsm file. You can continue working on your data in a stable environment.

Frequently Asked Questions
What is a volatile VBA UDF in Excel?
A volatile user-defined function (UDF) is a custom macro function created in VBA that recalculates every time a change is made in any cell of the workbook, not just the cells it references. This often causes performance slowdowns or crashes.
Why does conditional formatting cause crashes when using VBA?
Conditional formatting evaluates continuously as you scroll or edit cells. When paired with a volatile VBA macro, it forces Excel to execute the code excessively, which can overwhelm the application's memory and trigger a crash.
How can I open my crashing Excel file to remove the VBA code?
You can bypass the crash by opening Excel in Safe Mode (hold the Ctrl key while launching Excel) or by opening Excel first, going to Trust Center settings, and disabling all macros before opening the problematic file.




