I am attempting to have the date automatically inserted in to the cell right of the selected cell on 2 separate columns (A and G), I have found a script that works perfect for column "A", but cannot make it work for both "A" and "G". So if I change the value on A2, B2 will add the date, and if I change the value on G4, H4 will add the date, looking for this to work for the entire column
Here is the code that works well for column A:
Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set a = Range("a:a")
If Intersect(t, a) Is Nothing Then Exit Sub
Application.EnableEvents = False
t.Offset(0, 1).Value = Date
Application.EnableEvents = True
End Sub
Bookmarks