ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Chronometer in cell (https://www.excelbanter.com/excel-programming/292612-chronometer-cell.html)

Dan Rubinsky

Chronometer in cell
 
How can I add a chronometer in a cell? I have i.e. two cells :
C4 D4
C4 is Beginning Hour and
D4 is Ending hour.
What I need is to have the possibity in having at least five cells wit
different chronometers at the same time and end each one at differen
times . Also needed, when I end a chronometer the time must be inserte
in the cell of ending hour.
Perhaps a VB can do this.

Thanks a lo

--
Message posted from http://www.ExcelForum.com


Nat Brown

Chronometer in cell
 
If you are triggering the Start/Stop times manually insert a couple of Command Buttons into your spreadsheet and use the click event procedures to paste the system time into the cells.
Ex

Private Sub cmdStart_Click() 'This would paste the same start time into all 5 start cell
Range("C4:C8").Value = No
End Su

Private Sub cmdStop_Click() 'This would paste the stop time into a single cel
Range("D4").Value = Now ' You would have to have an individual button for each stop cel
End Su

Private Sub cmdStop_Click() 'This would use a single button to cycle through all 5 stop cell
If cmdStop.Caption = "Stop " & 1 Then 'Be sure to put the caption "Stop 1" on this buttons propertie
Range("B3").Value = No
cmdStop.Caption = "Stop " &
ElseIf cmdStop.Caption = "Stop " & 2 The
Range("B4").Value = No
cmdStop.Caption = "Stop " &
ElseIf cmdStop.Caption = "Stop " & 3 The
Range("B5").Value = No
cmdStop.Caption = "Stop " &
ElseIf cmdStop.Caption = "Stop " & 4 The
Range("B6").Value = No
cmdStop.Caption = "Stop " &
ElseIf cmdStop.Caption = "Stop " & 5 The
Range("B7").Value = No
cmdStop.Caption = "Stop " &
End I
End Su

To see the elapsed time, add a formula in another cell. ex.(=D4-C4
Be sure to format your cells for time

hope this helps


All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com