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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top