Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Everyone,
And thanks in advance for any replies. Like most people, I have lots of problems calculating times in Excel. And this time, I'm completely stuck!!! I'll try and explain this as precisely as possible so everyone understands. I'm sure others will also appreciate the answer. I need to put the current time in a cell. This must be updated on each refresh. In a second cell, I need to calculate the current time plus a time that I set. For instance, CurrentTime+ 40 seconds. The idea is to use this final value in a VBA procedure, if that's any help. Many Thanks, Herbie |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jul 12, 10:13*am, wrote:
Hi Everyone, And thanks in advance for any replies. Like most people, I have lots of problems calculating times in Excel. And this time, I'm completely stuck!!! I'll try and explain this as precisely as possible so everyone understands. I'm sure others will also appreciate the answer. I need to put the current time in a cell. This must be updated on each refresh. In a second cell, I need to calculate the current time plus a time that I set. For instance, CurrentTime+ 40 seconds. The idea is to use this final value in a VBA procedure, if that's any help. Many Thanks, Herbie The following puts the time in the active cell and 40 seconds later in the adjacent cell: Sub timeIt() With ActiveCell .Value = Now - Int(Now) .Offset(0, 1).Value = .Value + TimeValue("00:00:40") .Offset(0, 1).NumberFormat = "[$-F400]h:mm:ss AM/PM" End With End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() In A5 enter "40" In B5 enter "=Now()" In C5 enter "=B5+A5/86400) Format B5 and C5 with an appropriate "Time" custom number format. (possibly: "h:mm:ss AM/PM") -- Jim Cone Portland, Oregon USA "thanks in advance means no thanks" http://www.contextures.com/excel-sort-addin.html wrote in message Hi Everyone, And thanks in advance for any replies. Like most people, I have lots of problems calculating times in Excel. And this time, I'm completely stuck!!! I'll try and explain this as precisely as possible so everyone understands. I'm sure others will also appreciate the answer. I need to put the current time in a cell. This must be updated on each refresh. In a second cell, I need to calculate the current time plus a time that I set. For instance, CurrentTime+ 40 seconds. The idea is to use this final value in a VBA procedure, if that's any help. Many Thanks, Herbie |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Peter,
In A1 enter 'Current tme:' In B1 enter '=Now()' In A3 enter 'Hours:' In B3 enter '0' In A4 enter 'Minutes' In B4 enter '0' In A5 enter 'Seconds' In B5 enter '40' In A6 enter 'Time Gap' In B6 enter '=Time(B3,B4,B5)' In A8 enter 'End time:' In B8 enter '=B1+B6' For B1, B6 and B8 set the numberformat to '"[$-F400]h:mm:ss' |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In Excel: is there a way of inserting the current time (what time it is right NOW) | Excel Discussion (Misc queries) | |||
In Excel: is there a way of inserting the current time (what time it is right NOW) | Excel Programming | |||
Having the current time inserted w/o updating the current time | Excel Worksheet Functions | |||
Calculating Current Age from DOB | Excel Worksheet Functions | |||
Can I automatically enter the current date or current time into a | New Users to Excel |