RattlingCarp3048
Board Regular
- Joined
- Jan 12, 2022
- Messages
- 166
- Office Version
- 365
- Platform
- Windows
I am working on modifying a code someone gave me on here a while back to auto enter the date/time. it has been tremendously helpful and i use it everywhere. However, this time around i am trying to mod it for a specific cell rather that an entire row or column but nothing happend when the cell changes, maybe because the value is a drop list? can someone help mod it so that if cell C29 <>"" then insert date/time in U29?
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Handler
If Target.Range("C29:H29") And Target.Value <> "" Then
Application.EnableEvents = False
Target.Range("U29") = Format(Now(), "mm-dd-yyyy hh:mm")
Application.EnableEvents = True
End If
Handler:
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Handler
If Target.Range("C29:H29") And Target.Value <> "" Then
Application.EnableEvents = False
Target.Range("U29") = Format(Now(), "mm-dd-yyyy hh:mm")
Application.EnableEvents = True
End If
Handler:
End Sub