I'm trying to write a sub that creates a timestamp in column J when the text "YES" is entered in column I.
Right now I've got a working sub that creates a timestamp in column J when a cell in column I is changed. But my attempts to change this sub to fit the above criteria have failed so far. Could you please advise or point me in the right direction?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim speakRange As Range
Dim timeSpeakRange As Range
Set speakRange = Range("I3:I1000")
If Intersect(Target, speakRange) Is Nothing Then Exit Sub
'Stop
Application.EnableEvents = False
'column for timestamp
Set timeSpeakRange = Range("J" & Target.Row)
'Determine if the input date/time should change
If timeSpeakRange .Value = "" Then
timeSpeakRange .Value = Date
End If
'Turn events back on
Application.EnableEvents = True
End Sub