How to Use Excel Macros to Track Changes (and When a Macro Is the Wrong Tool)
An independent product, not affiliated with Microsoft.
A macro is a recorded or hand-written set of VBA instructions that automates work in Excel. Macros are the right tool for automation: batch formatting, imports, report generation. One popular macro job is different, though. Thousands of people write Worksheet_Change loggers to track who changed which cell. That job a macro does poorly, and this page shows both the macro way and the simpler way.
How do I record a basic macro in Excel?
Recording is the no-code entry point: Excel watches what you do and writes the VBA for you.
- Enable the Developer tab: File → Options → Customize Ribbon, then tick Developer.
- On the Developer tab, click Record Macro, name it, and choose where to store it.
- Do the task once: format the range, insert the columns, whatever the job is.
- Click Stop Recording. Run it again any time with Macros → Run, or assign a shortcut key.
- Save the workbook as .xlsm (macro-enabled). A plain .xlsx silently strips macros.
To see or edit the generated code, press Alt+F11 to open the VBA editor. Recorded macros replay actions; they do not react to events. For that you write code by hand, which is where change tracking comes in.
How do I write a macro that logs cell changes?
The standard pattern is a Worksheet_Change event handler that appends a row to a log sheet on every edit. Add a sheet named ChangeLog, then paste this into the worksheet's code module (right-click the sheet tab → View Code):
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range, r As Long
Application.EnableEvents = False
For Each c In Target.Cells
With Worksheets("ChangeLog")
r = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
.Cells(r, 1).Value = Now
.Cells(r, 2).Value = Me.Name & "!" & c.Address(False, False)
.Cells(r, 3).Value = c.Value
.Cells(r, 4).Value = Environ$("Username")
End With
Next c
Application.EnableEvents = True
End Sub
This logs the timestamp, cell, new value, and Windows username. It works, and for a single workbook on one machine it may be all you need. Notice what it does not capture: the old value (that needs a shadow copy of the sheet and considerably more code), edits made while events are disabled, and any hint of why the change was made. One more caution before you paste it into anything important: if a line inside the loop errors (say the ChangeLog sheet gets renamed), EnableEvents is never switched back on, and every event macro in the workbook silently stops until someone resets it. Production versions need error handling around that.
Where does a change-tracking macro fall short?
The macro approach carries structural limits that no amount of extra VBA fully removes.
| Concern | Change-logging macro | ExcelRewind |
|---|---|---|
| Setup | VBA skills; code per workbook | Install once, click Record |
| Captures old and new value | New only, unless you write shadow-copy code | Yes |
| Records why a change was made | No | Yes (a note per edit) |
| File format | Forces .xlsm; macro security prompts for every recipient | Original stays .xlsx; recording is a separate .rewind file |
| Excel for the web | VBA does not run there | The add-in records in Excel desktop and Excel for the web; replay works in any browser |
| Sharing the history | Recipient gets your live workbook, log and all | Send the .rewind file or a link; the workbook stays with you |
| Corporate IT | Macros are commonly blocked by policy | Standard Office add-in distribution |
Macros remain the better tool for automation itself. ExcelRewind does not automate anything; it records. If your macro formats reports, keep the macro.
What is the no-code way to track changes and the reasons behind them?
ExcelRewind is an Excel add-in (with a Google Sheets add-on) that records why the numbers in a spreadsheet change. It captures every cell edit with timing and a note explaining the reasoning, and saves them to a shareable, replayable .rewind companion file. It never modifies the original workbook and never uploads spreadsheet content1.
Compared with the macro above: no VBA, no .xlsm conversion, old and new values captured for every edit, and each change can carry the reason it was made. A colleague replays the recording in their browser and watches the workbook evolve edit by edit. For the built-in alternatives and their limits, see how to track changes in Excel, and how recording keeps your data on your machine.
Watch a live replay Install the add-in
Frequently asked questions
Can an Excel macro track cell changes?
Yes. A VBA macro using the Worksheet_Change event can write each edit to a log sheet: timestamp, cell address, new value, and username. Capturing the old value takes extra code, the workbook must be saved as .xlsm, and the macro cannot explain why a change was made. ExcelRewind records every cell edit with timing and a note, without any code.
How do I enable macros in Excel?
Go to File, then Options, then Trust Center, then Trust Center Settings, then Macro Settings. Excel blocks macros from the internet by default; for files you trust, right-click the file in File Explorer, open Properties, and check Unblock. Save macro-enabled workbooks as .xlsm, not .xlsx.
Do Excel macros work in Excel for the web?
No. VBA macros do not run in Excel for the web. Microsoft offers Office Scripts there instead, which is a separate TypeScript-based system. A change-logging VBA macro only works in the desktop app, so edits made in the browser are never logged.
What is the difference between a change-tracking macro and ExcelRewind?
A Worksheet_Change macro writes a bare log line per edit inside one macro-enabled workbook and needs VBA skills to build and maintain. ExcelRewind is an Excel add-in that records every cell edit with timing and a note explaining the reasoning, saved to a shareable, replayable .rewind file. It works without code, never modifies the original workbook, and never uploads spreadsheet content.
1 The one exception: a Kiosk/Exam mode submission uploads the finished exam recording to ExcelRewind's storage for instructor review, sealed to the organization's encryption key when one is enabled.
Last updated: July 2026.
ExcelRewind is an independent product and is not affiliated with, endorsed by, or sponsored by Microsoft Corporation. Microsoft and Excel are trademarks of the Microsoft group of companies. Questions? [email protected].