Hi All,
I have created a spreadsheet to record a set of data and when a new record/line is added I would like to automatically enter today's date in the final column of the table to ensure that we know when that data was entered. I have written the code below to do this and initally it worked however it seems to have stopped now. I am unsure if there are any basic faults with the code or if there is a much better way of writing this.
I would be very grateful for any advice or help received.
Many thanks,
C Jones
Private Sub Worksheet_Change(ByVal Target As Range)
If Target(1).Column = 5 Then
Application.EnableEvents = False
For Each cell In Target.Columns(1).Cells
cell.Offset(0, 1).Value = Date
Next
Application.EnableEvents = True
End If
End Sub
Bookmarks