Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rw As Range
If Not Intersect(Target, Range("H:H")) Is Nothing Then
Application.EnableEvents = False
For Each Rw In Target.Rows
Cells(Rw.Row, "Q").Value = Environ("Username")
Cells(Rw.Row, "R").Value = Now
Cells(Rw.Row, "R").NumberFormat = "dd/mm/yyyy hh:mm"
Next Rw
ElseIf Target.Address(0, 0) = "AA5" Then
If LCase(Target.Value) = "cancel all" Then
Range("S5:V5").Clear
ElseIf LCase(Target.Value) = "cancel 1" Then
With Range("S5:V5")
.Value = Evaluate("if(" & .Address & "<>""""," & .Address & "-1,"""")")
Next Rw
ElseIf Target.Address(0, 0) = "AA6" Then
If LCase(Target.Value) = "cancel all" Then
Range("S6:V6").Clear
ElseIf LCase(Target.Value) = "cancel 1" Then
With Range("S6:V6")
.Value = Evaluate("if(" & .Address & "<>""""," & .Address & "-1,"""")")
End With
End If
End If
Application.EnableEvents = True
End Sub