Hi Everyone,
Hope you can help with this one.
Is it possible to have a Worksheet Change event based on different values in the Target?
The Code I have is:
Or is there a different way I should be tackling this?
Thanks in advance!
Hope you can help with this one.
Is it possible to have a Worksheet Change event based on different values in the Target?
The Code I have is:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
ActiveSheet.Unprotect
If Target.Cells.Value <> "Out Of Service" Then Exit Sub
If Not Intersect(Target, Range("N4:N100")) Is Nothing Then
With Target(1, 18)
.Value = Date & " " & Time
End With
End If
Target.Offset(0, 1).Select
If Target.Cells.Value <> "Back In Service" Then Exit Sub
If Not Intersect(Target, Range("N4:N100")) Is Nothing Then
With Target(1, 19)
.Value = Date & " " & Time
End With
End If
Target.Offset(0, 1).Select
End Sub
Or is there a different way I should be tackling this?
Thanks in advance!