ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   keeping track of time (https://www.excelbanter.com/excel-programming/341874-keeping-track-time.html)

jhahes[_34_]

keeping track of time
 

Is there a simple way to do the following.

Just 1 sheet.


I want to have a user click a command button and it puts the time at
that moment in cell A2. I don't want it to be a now() or today()
because when they are done working i want them to click another button
that puts the time in cell B2, and my formula will figure the time
difference.

Thanks for any help.


Josh


--
jhahes
------------------------------------------------------------------------
jhahes's Profile: http://www.excelforum.com/member.php...o&userid=23596
View this thread: http://www.excelforum.com/showthread...hreadid=473084


tad_wegner[_3_]

keeping track of time
 

Josh-

Sub timedelay()
Cells(2, 1) = "=now()"
Cells(2, 1) = Cells(2, 1)
End Sub

this uses the "now" function then immediately writes over th
"function" with the value... this way it is no longer a function (whic
will change with time), but the value

--
tad_wegne
-----------------------------------------------------------------------
tad_wegner's Profile: http://www.excelforum.com/member.php...fo&userid=2777
View this thread: http://www.excelforum.com/showthread.php?threadid=47308


jhahes[_35_]

keeping track of time
 

Thanks Tad, works great!!

--
jhahe
-----------------------------------------------------------------------
jhahes's Profile: http://www.excelforum.com/member.php...fo&userid=2359
View this thread: http://www.excelforum.com/showthread.php?threadid=47308


Bill Martin[_2_]

keeping track of time
 
jhahes wrote:
Is there a simple way to do the following.

Just 1 sheet.


I want to have a user click a command button and it puts the time at
that moment in cell A2. I don't want it to be a now() or today()
because when they are done working i want them to click another button
that puts the time in cell B2, and my formula will figure the time
difference.

Thanks for any help.


Josh




Built into Excel is the "Ctrl ;" function. It does what you want. After it
time stamps the active cell you can format the cell to show date or time or
whatever it is you wanted.

Bill

Myrna Larson

keeping track of time
 
Or, more simply,

Cells(2, 1).Value = Now()


On Tue, 4 Oct 2005 13:33:44 -0500, tad_wegner
wrote:


Josh-

Sub timedelay()
Cells(2, 1) = "=now()"
Cells(2, 1) = Cells(2, 1)
End Sub

this uses the "now" function then immediately writes over the
"function" with the value... this way it is no longer a function (which
will change with time), but the value.



All times are GMT +1. The time now is 12:29 AM.

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