Can someone give me some insight into making a Time Stamp in column Q of an Entry into my sheet and then if I make a change to register a Updated stamp in column R.
I want to leave the initial time stamp as the detail when the record was initially created unchanged.
This is the code I have so far but it is only overwriting the Time Stamp in column Q if I make a change to the records in columns A2:P100000....needs to be dynamic as I add records daily.
I tried putting the code in a Sub and calling it from the worksheet change and it is erroring on the "Target" of the following code line
If Intersect(Target, myTableRange) Is Nothing Then Exit Sub
Private Sub Worksheet_Change(ByVal Target As range)
Dim myTableRange As range
Dim myDateTimeRange As range
Dim myUpdatedRange As range
Set myTableRange = range("A2:P100000")
If Intersect(Target, myTableRange) Is Nothing Then Exit Sub
Set myDateTimeRange = range("Q" & Target.Row)
Set myUpdatedRange = range("R" & Target.Row)
If myDateTimeRange.Value = "" Then
End If
myDateTimeRange.Value = Now
End Sub
I want to leave the initial time stamp as the detail when the record was initially created unchanged.
This is the code I have so far but it is only overwriting the Time Stamp in column Q if I make a change to the records in columns A2:P100000....needs to be dynamic as I add records daily.
I tried putting the code in a Sub and calling it from the worksheet change and it is erroring on the "Target" of the following code line
If Intersect(Target, myTableRange) Is Nothing Then Exit Sub
Private Sub Worksheet_Change(ByVal Target As range)
Dim myTableRange As range
Dim myDateTimeRange As range
Dim myUpdatedRange As range
Set myTableRange = range("A2:P100000")
If Intersect(Target, myTableRange) Is Nothing Then Exit Sub
Set myDateTimeRange = range("Q" & Target.Row)
Set myUpdatedRange = range("R" & Target.Row)
If myDateTimeRange.Value = "" Then
End If
myDateTimeRange.Value = Now
End Sub