View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2030_] Rick Rothstein \(MVP - VB\)[_2030_] is offline
external usenet poster
 
Posts: 1
Default "Time Clock" Functions

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.