Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Spreadsheet
I need to track information on a spreadsheet and need to know how long that
information has been lying there. Is there a timer or clock one can insert to do this. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Spreadsheet
you could use th eworksheet's CHANGE event to add a timestamp to mark when
the value was entered. right click the sheet tab *& go to the code page, add thsi: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) ' check column B If Target.Column = 2 Then Target.Offset(0, -1).Value = Format(Now, "dd-mmm-yy hh:mm") End If End Sub if you enter anything in column B it adds a timestamp to column A "Robbie" wrote: I need to track information on a spreadsheet and need to know how long that information has been lying there. Is there a timer or clock one can insert to do this. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Spreadsheet
The easiest way is to have an adjacent column that stores the time when
something is changed, along the lines of Private Sub Worksheet_Change(ByVal Target As Range) Static prevValue On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("K1:K34")) Is Nothing Then With Target.Offset(0, 1) .Value = Now .NumberFormat = "dd mmm yyyy 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. -- HTH RP (remove nothere from the email address if mailing direct) "Robbie" wrote in message ... I need to track information on a spreadsheet and need to know how long that information has been lying there. Is there a timer or clock one can insert to do this. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
link a local spreadsheet to a network shared spreadsheet | Setting up and Configuration of Excel | |||
conversion of MS Works Spreadsheet to Excel 2002 Spreadsheet | Excel Discussion (Misc queries) | |||
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? | Excel Discussion (Misc queries) | |||
How do I convert exel spreadsheet to works spreadsheet? | Excel Discussion (Misc queries) | |||
How to open another Excel spreadsheet to copy data into current spreadsheet ? | Excel Programming |