I have this VBA code to change or to update the time stamp for 2 cells at the same row in Excel, but some how I can only have the first column to update the time stamp when I change the value but nothing happen to the second column, it return blank value. I also want to have the sheet protected so when the time stamp is update, it is locked and not be edit but dont know how to put it into protection
Private Sub Worksheet_Change(ByVal Target As Range)
Dim xRg As Range
On Error Resume Next
Dim I As Range, J As Range, L As Range, M As Range
Set I = Range("I:I")
Set L = Range("L:L")
Set T = Target
' Timestamp for Trackin
If Intersect(I, T) Is Nothing Then Exit Sub
If Intersect(I, T).Value = "Yes" Then Range("J" & T.Row).Value = Now
' Timestamp for Completion
If Intersect(L, T) Is Nothing Then Exit Sub
If Intersect(L, T).Value = "Complete" Then Range("M" & T.Row).Value = Now
Application.EnableEvents = True
End Sub