+ Reply to Thread
Results 1 to 5 of 5

Determine if shift start/end time falls between times over 24h - more complex

  1. #1
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Lightbulb Determine if shift start/end time falls between times over 24h - more complex

    Hi Everyone,
    You know the time when you sit over one piece of formula and you are stuck? That's where I am at now.
    I decided to reach for help.
    I am working an a rota tool which also is to show who is present and when.
    I am struggling with the daily breakdown.
    I have shifts which start say, 20:00 on one date and end 8:00 on the following date.
    I need to show those correctly on the "Daily" sheet.

    Shifts worked : "Schedule" sheet
    List of shifts and corresponding start/end times: "Shifts" sheet.

    My current formula in C5 (same for C5:CT44) is:
    Please Login or Register  to view this content.
    attaching sample workbook.

    I hope you will see above this and will be able to help or point me in the right direction.
    Thank You!
    Attached Files Attached Files
    Last edited by annazet; 11-30-2019 at 01:45 PM.

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Determine if shift start/end time falls between times over 24h - more complex

    Please change Shifts!
    C16 to 01-01-1900 10:00:00
    C17 to 01-01-1900 08:00:00
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Re: Determine if shift start/end time falls between times over 24h - more complex

    Thank you i've tried your suggestion.
    It works!
    This solution blocked way of calculating shift times before and after midnight (Shifts sheet column E/F - hidden)

    before midnight
    Please Login or Register  to view this content.
    Thank you for relieving my brain xx

    I struggled with calculating the time before midnight and looked at it as a personal victory now i am back at it; any help? SORRY

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Determine if shift start/end time falls between times over 24h - more complex

    Please try at Shifts
    E4
    =(MIN(1,C4)-B4)*24

    G4
    =(C4-B4)*24

  5. #5
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Re: Determine if shift start/end time falls between times over 24h - more complex

    Resulted in negative 10. That's all right nevermind; i will show 24h and allow going over midnight.
    You saved me so much time! And learned a new trick. Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 07-13-2019, 01:12 PM
  2. Replies: 4
    Last Post: 03-02-2016, 02:46 AM
  3. Replies: 2
    Last Post: 07-14-2015, 02:12 PM
  4. Replies: 21
    Last Post: 05-11-2015, 03:53 PM
  5. Determining if a datetime falls within start and end date times
    By migooz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-25-2013, 03:05 PM
  6. Replies: 6
    Last Post: 08-23-2013, 07:56 AM
  7. Using start and end times to determine elapsed time
    By Lothar69 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2011, 09:25 AM

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.6.0 RC 1