HEllo, I am trying to build two timestamps in the same row that trigger from different cell changes.
When column B changes, timestamp in column F
When Column L changes, Timestamp in column M
My second timestamp wont work. any ideas? Heres my code:
When column B changes, timestamp in column F
When Column L changes, Timestamp in column M
My second timestamp wont work. any ideas? Heres my code:
VBA Code:
'timestamps
Private Sub Worksheet_Change(ByVal Target As Range)
Call EventChange_1(Target)
Call EventChange_2(Target)
End Sub
'assign timestamp
Sub EventChange_1(Target)
Dim F As Range, B As Range, t As Range
Set F = Range("F:F")
Set B = Range("B:B")
Set t = Target
If Intersect(t, B) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("F" & t.Row).Value = Now
Application.EnableEvents = True
End Sub
'Complete timestamp
Sub EventChange_2(Target)
Dim M As Range, L As Range, t As Range
Set M = Range("M:M")
Set L = Range("L:L")
Set t = Target
If Intersect(t, L) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("M" & t.Row).Value = Now
Application.EnableEvents = True
End Sub