Currently, when a cell in columns A, B, C, E, or F is updated, the cell in column D of that row will return the date/time of the last update.
However, I am unable to "undo" any changes made within the range. Is this possible?
However, I am unable to "undo" any changes made within the range. Is this possible?
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myTableRange As Range
Dim myUpdatedRange As Range
'Your data table range
Set myTableRange = Range("A:C,E:F")
'Check if the changed cell is in the data tabe or not.
If Intersect(Target, myTableRange) Is Nothing Then Exit Sub
'Stop events from running
Application.EnableEvents = False
'Column for last updated date/time
Set myUpdatedRange = Range("D" & Target.Row)
'Update the updated date/time value
myUpdatedRange.Value = Now
'Turn events back on
Application.EnableEvents = True
End Sub