I am using a Macro I pulled offline to timestamp certain cells when changed
Is there a way to alter this macro so that it works if instead of looking for any value and blank values, it will add a date/time if TRUE is inputted in O11 and clears it if O11 is FALSE?
Any help would be appreciated as I am a VBA novice.
-R
Is there a way to alter this macro so that it works if instead of looking for any value and blank values, it will add a date/time if TRUE is inputted in O11 and clears it if O11 is FALSE?
Any help would be appreciated as I am a VBA novice.
-R
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("O11"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub
Last edited: