I recently added this to a worksheet. F11 to open VBA. Select the worksheet you want this to run on. Change the column number to the column you want watched (here it is 5). It also allows a cut and paste of multiple rows.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
Application.EnableEvents = False
For Each Cell In Target
If Cell.Column = 5 And Cell <> "" Then
If Range("a" & Cell.Row) <> "" Then
If MsgBox("Date/Time stamps exists in row " & Cell.Row & _
", do you wish to change them?", vbYesNo, _
"Change time stamps?") = vbYes Then
Range("A" & Cell.Row) = Date
End If
Else
Range("A" & Cell.Row) = Date
End If
End If
Next Cell
Application.EnableEvents = True
End Sub
Bookmarks