+ Reply to Thread
Results 1 to 9 of 9

Thread: How to calculate time range from 22:00 - 6:00

  1. #1
    Registered User
    Join Date
    02-06-2012
    Location
    Las pinas, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    How to calculate time range from 22:00 - 6:00

    hi guys,

    I've been trying to figure how to compute the time for a certain time range.

    ex.
    time in time out Start Premium End Premium Hours in Premium
    20:06 9:35 22:00 6:00 ????
    1:00 21:00 22:00 6:00

    I need to calculate how many time they work for start premium to end premium. Please see my example.

    Just to not that this is 24 hours work shift and there are different time scenario which makes it more difficult for me.

    thanks in advance
    Attached Files Attached Files
    Last edited by kurk011; 02-06-2012 at 04:48 PM.

  2. #2
    Registered User
    Join Date
    02-06-2012
    Location
    Las pinas, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to calculate time range from 22:00 - 6:00

    I think the time mess up on the example.. you could check the attachment to understand more the problem i have

  3. #3
    Forum Guru Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    MS Excel 2010
    Posts
    2,247

    Re: How to calculate time range from 22:00 - 6:00

    Try

    =MOD(D2-C2,1)

  4. #4
    Registered User
    Join Date
    02-06-2012
    Location
    Las pinas, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to calculate time range from 22:00 - 6:00

    thanks for the reply but it doesnt give the value i want. i need to compute the hours he worked within that range (22:00 - 6:00).

  5. #5
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,056

    Re: How to calculate time range from 22:00 - 6:00

    Try this formula in E2

    =MOD(B2-A2,1)-(B2<A2)*(C2-D2)-MEDIAN(B2,C2,D2)+MEDIAN(A2,C2,D2)

    assumes that C2 to D2 will always cross midnight
    Audere est facere

  6. #6
    Registered User
    Join Date
    02-06-2012
    Location
    Las pinas, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    5

    Thumbs up Re: How to calculate time range from 22:00 - 6:00

    Quote Originally Posted by daddylonglegs View Post
    Try this formula in E2

    =MOD(B2-A2,1)-(B2<A2)*(C2-D2)-MEDIAN(B2,C2,D2)+MEDIAN(A2,C2,D2)

    assumes that C2 to D2 will always cross midnight
    thanks... got it.

  7. #7
    Registered User
    Join Date
    02-10-2012
    Location
    ireland
    MS-Off Ver
    Excel 2002
    Posts
    8

    Re: How to calculate time range from 22:00 - 6:00

    Hi Guys wondering if you could help me

    i need to create a time sheet where by hours from 7 am to 18:00(6pm) get placed in one area and then hours after this get placed in another area to work out how many hours worked on on morning shift and then in the evening. as sometimes we only work 2 hours between 7-18 and then 8 after that your help would be greatly appreciated

    TimeSheet.xls

  8. #8
    Forum Guru Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    MS Excel 2010
    Posts
    2,247

    Re: How to calculate time range from 22:00 - 6:00

    Create a new thread, do not hijack someone else's.

  9. #9
    Registered User
    Join Date
    02-10-2012
    Location
    ireland
    MS-Off Ver
    Excel 2002
    Posts
    8

    Re: How to calculate time range from 22:00 - 6:00

    ok was just posting it here as my issue relates and this one appears to be solved made more sense to me

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0