TIMFOX123
asked on
explain this formula to me =CEILING(NOW()+419/24,7)+5/24
I am having problems trying to figure out this macro.
=CEILING(NOW()+419/24,7)+5 /24
I want the first time it is 5 am, saturday that is at least 396 hours from now
I also want the first time it is 5 am,Sunday that is at least 415 hours from now
=CEILING(NOW()+419/24,7)+5
I want the first time it is 5 am, saturday that is at least 396 hours from now
I also want the first time it is 5 am,Sunday that is at least 415 hours from now
this macro will give you the first saturday @ 5am with an offset of 17 days and 11 hours.
for the first saturday @ 5am, use :
for the first saturday @ 5am, use :
=CEILING(now(),7) + 5/24
for the first sunday @ 5 am, use : =CEILING(now(),7) + 29/24
if you want the number of hours till the next saturday, 5am :
=24*(CEILING(now(),7)+5/24 - now())
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
round off or round down ?
then you use the ceiling to round it off to multiples of 7
Round off makes 6.9 = 7 and 6.1 = 6
Round down makes 6.9 = 6 and 6.1 = 6
then you use the ceiling to round it off to multiples of 7
Round off makes 6.9 = 7 and 6.1 = 6
Round down makes 6.9 = 6 and 6.1 = 6
the ceiling rounds it up
so 6.9 = 7 and 6.0001 = 7 and 6.0 = 6
so 6.9 = 7 and 6.0001 = 7 and 6.0 = 6
Did your original question not answer it??
http://www.experts-exchang e.com/Soft ware/Offic e_Producti vity/Offic e_Suites/M S_Office/E xcel/Q_269 68055.html
http://www.experts-exchang
ASKER
robhenson:
When I tried make this work, for myself I could not get it to work .
your code worked flawlessly
I just did not work as flawlessly :)
When I tried make this work, for myself I could not get it to work .
your code worked flawlessly
I just did not work as flawlessly :)
ASKER
thank you both
You should have posted a comment on the original question rather than starting a new one, it would not have cost you any thing - points etc.
Cheers
Rob H
Cheers
Rob H
first you add 419 hours (17 days and 11 hours).
then you use the ceiling to round it off to multiples of 7 (that is: you search for the start of the next week)
then you add 5 hours