Hello there.
I am presently learning VBA codes and have been searching for one that will update the date automatically when another cell is updated. I've seen several that are very close with the best one shown below.

The problems that I'm having are as follows:

I need to exclude Rows 1 - 6 from updating as they have headers, etc.;
I need to add Column "P" to the range, which is not working when I simply make the range "A:N,P" (the date column is Column O);
If the new cell entry is deleted (i.e. if I entered something in the wrong cell, for instance), I need to have the automatic date cell return to the prior entry.

Can anyone help with this?


Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range

Application.EnableEvents = False

For Each cell In Target
If Not Intersect(cell, Range("A:N")) Is Nothing Then _
Range("O" & cell.Row) = Date
Next cell

Application.EnableEvents = True
End Sub