How do I set an automatic date stamp into a cell in Excel?

N

Nilla_Brown

I am trying to set up my spread sheet so that when I enter a value in A1 (for
example) the time will pop up in A7. I have tried to do "if" statements, but
when I do "IF A1=0, THEN ***, NOT CTL,SHIFT;" BUT when I type "ctl,shft ;" it
automatically enters the time I entered the formula. I work in a phone
queue, and would like to automatically keep up with the times my calls come
in without having to remember to do so.
 
B

Bob Phillips

You need VBA, else the time just keeps updating

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:M1")) Is Nothing Then
With Target
.Offset(6, 0).Value = Format(Time, "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.
 
Top