diogodasilva
New Member
- Joined
- Feb 17, 2022
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
- MacOS
Hi experts,
I am trying to edit this code so the target.column looks for multiple columns change instead of just one.
I am trying to edit this code so the target.column looks for multiple columns change instead of just one.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Handler
If Target.Column = 8 And Target.Value <> "" Then
Application.EnableEvents = False
Target.Offset(0, 1) = Format(Now(), "dd-mm-yyyy hh:mm:ss")
Application.EnableEvents = True
End If
Handler:
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("I3").Sort Key1:=Range("I4"), Order1:=xlDescending, Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub