View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Valiant Valiant is offline
external usenet poster
 
Posts: 12
Default "Time Clock" Functions

Hey Rick,
Thanks for the help, that is a great macro for getting the time and filling
it in like a list. I really appreciate that. My only question remaining is,
is there a way to add to the macro so that it takes the newly recieved time
and changes it into a format that only displays the time and keeps the date
seperate (or better yet, assigns the date to one column and the time to
another)? Thanks again for the help.

"Rick Rothstein (MVP - VB)" wrote:

Something like this maybe...

Sub TimeStamp()
Const TimeStampColumn As String = "A"
Dim X As Long
Dim LastUsedRow As Long
With Worksheets("Sheet1")
LastUsedRow = .Cells(Rows.Count, TimeStampColumn).End(xlUp).Row
.Cells(LastUsedRow - (.Cells(LastUsedRow, TimeStampColumn). _
Value < ""), TimeStampColumn).Value = Now
End With
End Sub

Rick


"valiant" wrote in message
...
Hello,
I'm looking to create a macro with similar function to that of a time
clock
used in work shops (one that when activated will copy the current time
(preferably seperated from the date) into another cell for use with other
equations). It should also fill it in like a list whenever the macro is
activated (so it fills in, for example, cell A1 when the macro is first
activated and the next time it is used it will fill in the current time in
A2). Can anyone help me with this? I appreciate it.