Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("D:D")) Is Nothing Then
If Target <> "" Then Range("R" & Target.Row) = Date
End If
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
If Not IsEmpty(Range("A1")) Then Exit Sub
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
End Sub