I'm using the following macro to insert todays date everytime an entry is posted in the range column. How can I ignore the replacement of the date in the target column if a date already exists. Also, my code does not work when I copy and paste data into the workbook or if i drag and drop the values below is my current code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("A2:A65000"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "mm/dd/yyyy"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub
Bookmarks