Timestamp on cells

A

Adam

Dear All

I have a shared work book at the users who access it have a worksheet where they enter in there statistics at the end of the day for that day

They enter information into there sheet name which is called after there first name & surname within cells range A7:G31

What I would love is perhaps in cells A40:G64 is a timestamp covering each cell within A7:G31 which tells me what date that cell was changed on

This is because I am collate these stats they provide and the users may not be in on a particular day so I dont want to count any stats they left in the spreadsheet twice

Can anyone help please

Adam
 
B

Bob Phillips

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A7:G31")) Is Nothing Then
With Target.Offset(33, 0)
.Value = Now
.NumberFormat = "dd mmm yyyy hh:mm:ss"
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Adam said:
Dear All,

I have a shared work book at the users who access it have a worksheet
where they enter in there statistics at the end of the day for that day.
They enter information into there sheet name which is called after there
first name & surname within cells range A7:G31.
What I would love is perhaps in cells A40:G64 is a timestamp covering each
cell within A7:G31 which tells me what date that cell was changed on?
This is because I am collate these stats they provide and the users may
not be in on a particular day so I dont want to count any stats they left in
the spreadsheet twice.
 
A

Anya

This might not be the best way to do that but it works.
The following code needs to be insterted into the
worksheet code. (to do that right click on the Sheet name,
for example "Sheet1" as you would to rename it and click
View Code).
Private Sub Worksheet_Change(ByVal Target As Range)

If ActiveCell.Row > 6 And ActiveCell.Row < 32 Then
If ActiveCell.Column > "0" And ActiveCell.Column < "8" Then
ActiveCell.Offset(34, 0).Value = Time
End If
End If
End Sub
 
Top