15. VBA Tips - Track Changes By Adding A Time Stamp

Using VBA Events, there's a clever way to add a time stamp when cells change so that you don't need to remember whether you have updated it or not:
- To do this, we can use the Worksheet_Change Event
- We can pick up the event of a change in value in a column, and add the date and time in another
Here's a screen shot of our data in Excel:
So, every time we change a value in the "Number1" column, a time stamp is updated in the "Last Changed" column
Here's the code we need to use in the worksheet module:
Explanation
- Worksheet_Change is an event that is fired off when a cell's value is changed
- Target in this case means the cell that has been changed
- We then check that we're changing data in the 4th column
- Then we add the result of the NOW function to the cell in the same row, but in column 3
Download sheet to practise how to Track Changes By Adding A Time Stamp in Excel
Training Video on how to Track Changes By Adding A Time Stamp in Excel:
| Attachment | Size |
|---|---|
| track-changes-by-adding-a-time-stamp.xls | 34 KB |
»
- Nick's blog
- Add new comment
- 764 reads

Recent comments
1 day 56 min ago
1 day 7 hours ago
1 day 12 hours ago
1 day 20 hours ago
1 day 20 hours ago
1 day 20 hours ago
1 day 21 hours ago
1 day 22 hours ago
4 days 6 hours ago
5 days 19 hours ago