I have gone through post after post and can not for the life of me get the time stamp to work.
If cell C5 on sheet2 is changed manully then Cell F5 on sheet2 shows the date it was changed simple F5 will always change to todays date when C5 is manually changed. Below is the code I am using and can not get it to work. I have also tried simpler code I have found on this forum with out getting it to work either. Please help it is driving me nuts.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("C5"), .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
If cell C5 on sheet2 is changed manully then Cell F5 on sheet2 shows the date it was changed simple F5 will always change to todays date when C5 is manually changed. Below is the code I am using and can not get it to work. I have also tried simpler code I have found on this forum with out getting it to work either. Please help it is driving me nuts.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("C5"), .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