Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Rounding time of day up to fall in during work hours

I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need it to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Rounding time of day up to fall in during work hours

Maybe this will help...........

=MAX(A1,INT(A1)+0.3541666667)

Vaya con Dios,
Chuck, CABGx3



"Jon Ratzel" wrote:

I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need it to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Rounding time of day up to fall in during work hours

Or to make it a little easier to understand:

=MAX(A1,INT(A1)+TIME(8,30,0))

CLR wrote:

Maybe this will help...........

=MAX(A1,INT(A1)+0.3541666667)

Vaya con Dios,
Chuck, CABGx3

"Jon Ratzel" wrote:

I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need it to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!



--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Rounding time of day up to fall in during work hours

If your working day start and finish times (8:30 AM and 5:00 PM) are in C1
and D1 respectively, then try
=IF(OR(MOD(A2,1)C$1,WEEKDAY(A2,2)5),WORKDAY(A2,1 )+B$1,IF(MOD(A2,1)<B$1,WORKDAY(A2,0)+B$1,A2))

I assume that if your time falls within the working day it stays unaltered?
--
David Biddulph

"Jon Ratzel" wrote in message
...
I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I
have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to
round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need it
to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!




  #5   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Rounding time of day up to fall in during work hours

Hmmmm........I thought everyone knew that .3541666667 was Excel for
8:30am...<G

Vaya con Dios,
Chuck, CABGx3



"Dave Peterson" wrote:

Or to make it a little easier to understand:

=MAX(A1,INT(A1)+TIME(8,30,0))

CLR wrote:

Maybe this will help...........

=MAX(A1,INT(A1)+0.3541666667)

Vaya con Dios,
Chuck, CABGx3

"Jon Ratzel" wrote:

I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need it to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!



--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Rounding time of day up to fall in during work hours

And what result does that give for the OP's second example, Chuck?
--
David Biddulph

"CLR" wrote in message
...
Maybe this will help...........

=MAX(A1,INT(A1)+0.3541666667)

Vaya con Dios,
Chuck, CABGx3


"Jon Ratzel" wrote:

I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I
have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to
round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need
it to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Rounding time of day up to fall in during work hours

That seems to be rounding down or up all my times to 8:30AM of the same
business day regardless of the time of day I originally had. This part works
perfect if my original time is before the 8:30AM start of the business day,
but what if my original time is after 5:00PM?

Thanks for the help, I'm getting close!

Jon




"CLR" wrote:

Maybe this will help...........

=MAX(A1,INT(A1)+0.3541666667)

Vaya con Dios,
Chuck, CABGx3



"Jon Ratzel" wrote:

I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need it to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Rounding time of day up to fall in during work hours

Yep, this seems to work perfect. Thanks! I like that I can change the
parameters of my work day now more easily too.

Jon




"David Biddulph" wrote:

If your working day start and finish times (8:30 AM and 5:00 PM) are in C1
and D1 respectively, then try
=IF(OR(MOD(A2,1)C$1,WEEKDAY(A2,2)5),WORKDAY(A2,1 )+B$1,IF(MOD(A2,1)<B$1,WORKDAY(A2,0)+B$1,A2))

I assume that if your time falls within the working day it stays unaltered?
--
David Biddulph

"Jon Ratzel" wrote in message
...
I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I
have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to
round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need it
to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!





  #9   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Rounding time of day up to fall in during work hours

You're right David, I didn't read close enough.........good catch.

Vaya con Dios,
Chuck, CABGx3



"David Biddulph" wrote:

And what result does that give for the OP's second example, Chuck?
--
David Biddulph

"CLR" wrote in message
...
Maybe this will help...........

=MAX(A1,INT(A1)+0.3541666667)

Vaya con Dios,
Chuck, CABGx3


"Jon Ratzel" wrote:

I'm working with adding and subtracting time and need a way to round a
date/time up to the next business day which runs 8:30AM-5:00PM. So, if I
have
a cell that has 1/25/08 7:36 AM (which is a Friday) I would need it to
round
to 1/25/08 8:30 AM. However if the time is 1/25/08 7:36 PM I would need
it to
round to 1/28/08 8:30 AM which is the start of the next business day. Can
someone help?

Thanks!





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
How do you subtract time as in a timecard to calculate hours work Dave Davis Excel Worksheet Functions 2 September 18th 06 05:58 PM
Subtract time between certain days/work hours? lisa b. Excel Worksheet Functions 2 July 17th 06 09:26 PM
Excel Time Sheet - Rounding To Quarter Hours C A Excel Worksheet Functions 2 October 18th 05 07:21 PM
Time functions, how do I work out number of hours jeanette.rimmer Excel Worksheet Functions 2 July 15th 05 11:53 AM
Work Hours Time Question Qaspec Excel Worksheet Functions 5 March 27th 05 02:58 PM


All times are GMT +1. The time now is 12:39 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"