coreyalaurence39
New Member
- Joined
- Mar 10, 2022
- Messages
- 20
- Office Version
- 2019
- Platform
- Windows
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Intersect(Target, Range("I2,L2,P2")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Select Case Target.Column
Case Is = 9
With Sheets("DispatcherTracking")
.Cells(.Rows.Count, "A").End(xlUp).Offset(1).Resize(, 4).Value = Array(Environ("UserName"), Target.Address, Target.Value, Now())
End With
Case Is = 12
With Sheets("Sheet1")
.Cells(.Rows.Count, "A").End(xlUp).Offset(1).Resize(, 4).Value = Array(Environ("UserName"), Target.Address, Target.Value, Now())
End With
Case Is = 16
With Sheets("Sheet2")
.Cells(.Rows.Count, "A").End(xlUp).Offset(1).Resize(, 4).Value = Array(Environ("UserName"), Target.Address, Target.Value, Now())
End With
End Select
Application.ScreenUpdating = True
End Sub
I have the above code set up to track changes to specific cells. Is it possible to add a case that will track changes in cells A5 to P1000 within the sheet and enter the changes to a sheet called Log Details. I am not sure how to manipulate the above code to do this.