Fix Excel Active Row Highlighting Not Working After Reopening
Question details
The user's active row highlighting setup stops functioning correctly after the workbook is reopened or uploaded to a SharePoint environment.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Reopening a macro-enabled workbook locally or editing it collaboratively via SharePoint and Excel for the web.
- Observed behavior
- The complete active row is no longer highlighted upon cell selection, despite the =ROW()=CELL("row") conditional formatting rule and VBA script being previously configured.
Ensure that your file is saved as a Macro-Enabled Workbook (.xlsm) and that macros are fully enabled in your Excel Trust Center settings.
Use Desktop Excel and Verify the VBA Trigger
Excel for the web and SharePoint do not support VBA execution. Opening the file in the desktop app and ensuring the selection event forces a recalculation will restore the highlighting.
Conditional formatting rules that rely on the CELL function require a worksheet recalculation to update visually when a new cell is selected. This recalculation is handled by a VBA macro, which cannot run in web-based Excel environments like SharePoint.
If you are viewing the workbook in SharePoint or a web browser, click on the 'Viewing' or 'Editing' button on the top ribbon, and select 'Open in Desktop App'.
In the desktop version of Excel, press the Alt + F11 keys simultaneously to open the Visual Basic for Applications (VBA) editor.
In the Project Explorer pane on the left, double-click the worksheet you are working on. Ensure the code window contains: Private Sub Worksheet_SelectionChange(ByVal Target As Range) followed by Target.Calculate and End Sub on the next lines.

Check the Conditional Formatting Range
If the rule's applied range is accidentally modified or fragmented, the highlighting will fail even if the VBA macro runs perfectly.
Use WPS Office for Reliable Spreadsheet Management
If you frequently encounter macro limitations, web-editing constraints, or compatibility issues in SharePoint and Excel, consider switching to WPS Office. It provides a lightweight, highly compatible desktop environment designed to handle your spreadsheets efficiently without browser-based VBA restrictions.
- 1. Download WPS Office: Visit the official WPS website and click the download button to get the free, lightweight installer.
- 2. Install the Software: Run the setup file and follow the quick on-screen instructions to install the suite on your computer.
- 3. Open Your Spreadsheets: Launch WPS Spreadsheets, open your Excel workbooks, and experience fast, reliable editing with native desktop performance.

Frequently Asked Questions
Why does conditional formatting with CELL("row") require VBA?
The CELL function is volatile, meaning it updates when the worksheet calculates, but simply clicking a new cell does not trigger a recalculation. A VBA Worksheet_SelectionChange event containing Target.Calculate is necessary to force Excel to recalculate and instantly update the row highlighting.
Does SharePoint or Excel for the web support VBA macros?
No, Excel for the web and the built-in SharePoint browser editor do not support the execution of VBA macros. To use features dependent on VBA, such as active row highlighting, you must open the workbook in your local desktop application.
Can I highlight both the active row and column simultaneously?
Yes. You can modify your conditional formatting formula to =OR(ROW()=CELL("row"), COLUMN()=CELL("col")) to highlight a crosshair (both row and column) of the currently selected cell, provided your VBA recalculation script is active.




