PC Review


Reply
Thread Tools Rate Thread

Calculating the current time in Excel 2007

 
 
peter_maw@hotmail.com
Guest
Posts: n/a
 
      12th Jul 2010
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
 
Reply With Quote
 
 
 
 
James Ravenswood
Guest
Posts: n/a
 
      12th Jul 2010
On Jul 12, 10:13*am, peter_...@hotmail.com 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
 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      12th Jul 2010

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




<(E-Mail Removed)>
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
 
Reply With Quote
 
Wouter HM
Guest
Posts: n/a
 
      14th Jul 2010
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 Time format - Sports Lap timing and calculating flebber Microsoft Access 4 16th Mar 2010 12:01 PM
Access 2007 calculating . . . for a long time jari.hollsten@gmail.com Microsoft Access Form Coding 0 30th Sep 2007 06:23 PM
Calculating Current Time in other Time Zones AJ Microsoft Access Form Coding 1 23rd Mar 2005 07:39 PM
Calculating current investment value, current mortgage balance Scott Meyers Microsoft Excel Worksheet Functions 1 10th Jul 2004 08:13 PM
Calculating time in Excel Mandy Quartz Microsoft Excel Misc 3 21st Jul 2003 09:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:47 AM.