How to set a time for the next 1/4 hour

  • Thread starter Thread starter BruceJ
  • Start date Start date
B

BruceJ

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
 
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)
 
Application.Wait Now + TimeValue("00:15:00")

Regards
BrianB
========================================================
 
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
 
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 makes
the intent somewhat more evident is:

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
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
 
Tushar,

Point taken, and I agree with you.

Bob

Tushar Mehta said:
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
 
Back
Top