Timestamps

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

Hello,

I need help with a time stamp formula.

When a user enters in information into cell A1, can cell
B1 read something like: "Entered by: John Doe on 06/23/04
@ 9:50 am"

The 'John Doe' would be their computer name. I believe
there's some type of formula that would pull the computer
name of the user. And the date & time would be when
information was entered into cell A1.

I'd greatly appreciate any help with this one.

Thank you,
Jay Gustafson
 
Try this

You can do it with the change event of the worksheet
This example will place the date/time in the B column if you change
a cell in the range A1:A20.

Place the code in the Sheet module

Right click on a sheet tab and choose view code
Paste the code there
Alt-Q to go back to Excel

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("a1:a20"), Target) Is Nothing Then
Target.Offset(0, 1).Value = "Entered by: " & Environ("Username") _
& " on " & Format(Now, "mm-dd-yy hh:mm:ss")
End If
End Sub
 
Back
Top