Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
For Each Cell In Target
If Not Intersect(Cell, Union(Columns("A:A"), Columns("C:C"))) Is Nothing Then
If Not Intersect(Cell, Columns("A:A")) Is Nothing Then
Cells(Cell.Row, 4).Value = Date
Else
Cells(Cell.Row, 6).Value = Date
End If
End If
Next Cell
End Sub
so i have this code and everytime i change anything in column a then i get a timestamp in column D and everytime i change column C then i get a date stamp in Column F, and its working perfectly. My question is how can i add another if and then circumstance to the code. Such as entering data in Column H and having the code enter a date stamp in column P. The thing is i have more than two columns i want to track changes in and i dont know how to add another set of parameters.???
Dim Cell As Range
For Each Cell In Target
If Not Intersect(Cell, Union(Columns("A:A"), Columns("C:C"))) Is Nothing Then
If Not Intersect(Cell, Columns("A:A")) Is Nothing Then
Cells(Cell.Row, 4).Value = Date
Else
Cells(Cell.Row, 6).Value = Date
End If
End If
Next Cell
End Sub
so i have this code and everytime i change anything in column a then i get a timestamp in column D and everytime i change column C then i get a date stamp in Column F, and its working perfectly. My question is how can i add another if and then circumstance to the code. Such as entering data in Column H and having the code enter a date stamp in column P. The thing is i have more than two columns i want to track changes in and i dont know how to add another set of parameters.???
