Inserting time stamp onchange of any cell

  • Thread starter Thread starter Mitchell Carey
  • Start date Start date
M

Mitchell Carey

I'm trying to insert a timestamp at the end of each row
of a spreadsheet whenever a cell in that row is changed
or edited. Is this a simple fix or a complicated macro?
Thanks in advance.

Mitch Carey
 
Mitch,

This worksheet event code checks for a change in rows 1-10, and puts the
date in column D

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
On Error GoTo ws_exit
If Not Intersect(Target, Range("1:10")) Then
Cells(Target.Row, 4).Value = Format(Date, "dd mmm yyyy")
End If

ws_exit:
Application.EnableEvents = True
End Sub


To enter it, right click the sheet tab, select 'View Code' from the menu,
and paste the code into the code pane shown.

Change the rows (1:10) to suit, and the date column Target.Row,4.
 
Back
Top