Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default How to set a time for the next 1/4 hour

I am looking to find out how to set a timer to the next 15 min interval (On
the 1/4 hour)


What would be the best way to set a varible (NxtTime) to the next 1/4 hour?

I need to have something run at each 15 minutes on the quater hour, how can
I figure out the NEXT 1/4 hour? I know I will add 900 seconds after that,
but I am not sure how to figure out the next 1/4 hour....




Thanks
Bruce


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default How to set a time for the next 1/4 hour

Bruce,

This should get you started

MsgBox Format(Application.RoundUp(Time * 96, 0) / 96, "hh:mm:ss")


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"BruceJ" wrote in message
news:%Henb.32171$275.58288@attbi_s53...
I am looking to find out how to set a timer to the next 15 min interval

(On
the 1/4 hour)


What would be the best way to set a varible (NxtTime) to the next 1/4

hour?

I need to have something run at each 15 minutes on the quater hour, how

can
I figure out the NEXT 1/4 hour? I know I will add 900 seconds after that,
but I am not sure how to figure out the next 1/4 hour....




Thanks
Bruce




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default How to set a time for the next 1/4 hour

Application.Wait Now + TimeValue("00:15:00")

Regards
BrianB
================================================== ======




"BruceJ" wrote in message news:<%Henb.32171$275.58288@attbi_s53...
I am looking to find out how to set a timer to the next 15 min interval (On
the 1/4 hour)


What would be the best way to set a varible (NxtTime) to the next 1/4 hour?

I need to have something run at each 15 minutes on the quater hour, how can
I figure out the NEXT 1/4 hour? I know I will add 900 seconds after that,
but I am not sure how to figure out the next 1/4 hour....




Thanks
Bruce

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default How to set a time for the next 1/4 hour

Thanks Chip,

I was looking for how to actually SET the varible. Bob Phillips gave me
the info I needed for that. I got to your site last week, so I had already
gotten that portion figured out, I just needed the next 15 min (based on a
1/4 hour)

Thanks
Bruce

"Chip Pearson" wrote in message
...
Bruce,

You can use the OnTime method to schedule a macro to execute. See
www.cpearson.com/excel/ontime.htm for example code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"BruceJ" wrote in message
news:%Henb.32171$275.58288@attbi_s53...
I am looking to find out how to set a timer to the next 15 min interval

(On
the 1/4 hour)


What would be the best way to set a varible (NxtTime) to the next 1/4

hour?

I need to have something run at each 15 minutes on the quater hour, how

can
I figure out the NEXT 1/4 hour? I know I will add 900 seconds after

that,
but I am not sure how to figure out the next 1/4 hour....




Thanks
Bruce








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default How to set a time for the next 1/4 hour

Nitpicking comment: I realize that 96 is the inverse of how XL stores
a time of 15 minutes (0:15:00), but an identical formulation that,
hopefully, makes the intent more evident is:

=ROUNDUP(B14/TIME(0,15,0),0)*TIME(0,15,0)

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Bruce,

This should get you started

MsgBox Format(Application.RoundUp(Time * 96, 0) / 96, "hh:mm:ss")


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"BruceJ" wrote in message
news:%Henb.32171$275.58288@attbi_s53...
I am looking to find out how to set a timer to the next 15 min interval

(On
the 1/4 hour)


What would be the best way to set a varible (NxtTime) to the next 1/4

hour?

I need to have something run at each 15 minutes on the quater hour, how

can
I figure out the NEXT 1/4 hour? I know I will add 900 seconds after that,
but I am not sure how to figure out the next 1/4 hour....




Thanks
Bruce





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default How to set a time for the next 1/4 hour

Tushar,

Point taken, and I agree with you.

Bob

"Tushar Mehta" wrote in message
om...
Nitpicking comment: I realize that 96 is the inverse of how XL stores
a time of 15 minutes (0:15:00), but an identical formulation that,
hopefully, makes the intent more evident is:

=ROUNDUP(B14/TIME(0,15,0),0)*TIME(0,15,0)

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Bruce,

This should get you started

MsgBox Format(Application.RoundUp(Time * 96, 0) / 96, "hh:mm:ss")


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"BruceJ" wrote in message
news:%Henb.32171$275.58288@attbi_s53...
I am looking to find out how to set a timer to the next 15 min

interval
(On
the 1/4 hour)


What would be the best way to set a varible (NxtTime) to the next 1/4

hour?

I need to have something run at each 15 minutes on the quater hour,

how
can
I figure out the NEXT 1/4 hour? I know I will add 900 seconds after

that,
but I am not sure how to figure out the next 1/4 hour....




Thanks
Bruce







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
"h:mm" format, but 12-hour time, not 24-hour time? [email protected] Excel Discussion (Misc queries) 5 September 2nd 08 10:54 AM
Changing decimal time into 24 hour time and reverse Bobzter100 Excel Discussion (Misc queries) 4 January 25th 08 11:38 AM
how to calculate time start & time finish in quarter hour Peter Wu Excel Discussion (Misc queries) 3 June 7th 06 12:58 AM
making a time a measurement of time, not an hour of the day?? small tom Excel Discussion (Misc queries) 7 January 24th 06 02:17 PM
convert time from 60 minute hour to 100 minute hour Jboerding Excel Discussion (Misc queries) 2 July 6th 05 11:30 PM


All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"