Time calculations

  • Thread starter Roger F Swinderman
  • Start date
R

Roger F Swinderman

Hi All,

You must be fed up with questions on time functions, but here goes. I need
to reference a cell containing NOW(), to count seconds giving a constant
readout of time, is this possible please.

Thanks in advance
Roger
 
P

Peo Sjoblom

Hi Roger,

I assume you mean a static version of now as opposed
something that changes all the time. You would need VBA
for that. Here's a simple macro

Sub EnterDate_Time()
ActiveCell.Value = Now
ActiveCell.NumberFormat = "mm-dd-yy hh:mm:ss"
End Sub


To install the above press Alt + F11, click insert>module
and paste in the above in the window that opens..
To get only time format change the number format to

"hh:mm:ss"


Now when you want this you can either press Alt + F8 and
select the macro or attach it to a button..


Regards,

Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top