Fix Merge Conflicts in Macro-Enabled Excel Workbooks in Teams
Question details
Multiple users experience repeated merge conflicts with disabled merge options when co-authoring a macro-enabled Excel workbook in Microsoft Teams, even when editing different worksheets.
- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Co-authoring a shared macro-enabled workbook (.xlsm) in Microsoft Teams where users actively edit the file simultaneously.
- Observed behavior
- Users receive repeated merge conflicts, and the 'Merge my change' option is disabled, preventing them from resolving the conflicts directly.
Ensure all users have saved a local copy of their current progress to prevent accidental data loss before making structural changes to the shared workbook.
Identify and Disable Conflicting Macros
Isolate the specific macros (e.g., automated timestamps or data-writing scripts) that are interfering with Excel's co-authoring engine.
Macros that write data, apply timestamps, calculate formulas, or modify the workbook structure in the background often conflict with the co-authoring engine in Teams. Identifying and temporarily disabling these macros helps restore normal synchronization.
When the merge conflict prompt appears, choose to save both the server version and your local copy to ensure no work is lost.
Open both saved workbooks side-by-side and review which specific cells or formulas triggered the merge error.
Click the 'Developer' tab on the Excel ribbon, then click 'Visual Basic' (or press ALT + F11) to access the macro code.
Temporarily comment out or disable macros one by one, paying special attention to automated triggers like 'Worksheet_Change' or date-checking functions, to find the exact script causing the conflict.
Restructure the Workflow to Avoid Co-authoring Interference
Modify how your team interacts with the macro-enabled file to prevent simultaneous macro executions.
Seamlessly Edit and Share Spreadsheets with WPS Office
If complex macros and co-authoring conflicts in Microsoft Excel are slowing down your team's productivity, consider migrating to WPS Office. It provides a lightweight, highly compatible environment for your spreadsheets with robust, conflict-free collaboration features.
- 1. Install WPS Office: Download and install the free version of WPS Office on your computer or mobile device.
- 2. Open your workbook: Launch WPS Spreadsheet and open your existing macro-enabled Excel file directly without converting it.
- 3. Collaborate via WPS Cloud: Upload the document to WPS Cloud and invite your team members to co-edit in a streamlined environment.

Frequently Asked Questions
Why does the 'Merge my change' option appear disabled?
This option is often disabled when Excel's co-authoring engine detects structural changes or background macro activities (like automated timestamps) that fundamentally conflict with another user's simultaneous edits, making an automatic merge impossible.
Can multiple people run macros in a shared Excel workbook at the same time?
Generally, it is highly discouraged. Macros that write data or alter the workbook structure can easily corrupt the file or cause unresolvable merge conflicts when multiple users are actively co-authoring the document in Teams.
Are there specific types of macros that cause more conflicts in Teams?
Yes. Macros that trigger on worksheet events (like Worksheet_Change), automated timestamping, date-checking functions, and scripts that refresh background data connections are frequent causes of co-authoring errors.




