Tom’s Tutorials For Excel: Stamping Your Worksheet Changes With Date and Time
Suppose your worksheet requires frequent entries in a column, and you want to automatically record the date and time of whenever a cell in that column changes.
In the picture, when Forecast cells in range C5:C16 are changed, the date and time of that change instantly gets placed into column D on the same row.
This requires a Worksheet_Change event procedure. Right-click on your worksheet tab, left-click to select View Code, and paste the following procedure into the large white area that is the worksheet module. Press Alt+Q to return to the worksheet.
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("C5:C16")) Is Nothing Then Exit Sub If Target.Cells.Count > 1 Then Exit Sub With Target.Offset(0, 1) .Value = Now .NumberFormat = "MM/DD/YYYY hh:mm AM/PM" End With End Sub