+ Reply to Thread
Results 1 to 5 of 5

Getting 'normal' working hours and 'night differential' hours- PLEASE HELP

  1. #1
    Registered User
    Join Date
    06-11-2018
    Location
    PH
    MS-Off Ver
    2016
    Posts
    3

    Question Getting 'normal' working hours and 'night differential' hours- PLEASE HELP

    Hi! I want to find out the number of 'normal' working hours and number of 'night differential' hours in this given time.

    Night shift starts at 10:00 PM - 6:00 AM, please see sample below.

    # of normal working hours should be 4 hours and 15 mins while # of night diff hours should be 4 hours and 45 mins.

    Format: h:mm

    C2: 17:45
    E2: 2:45


    Thank you in advance!!

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Getting 'normal' working hours and 'night differential' hours- PLEASE HELP

    I can't see the formula you are using in C2 or E2, so can't be of much help.

    HOWEVER - change your format to [h]:mm. It works a lot better when passing midnight.

    I hope this helps, please let me know!

    Regards,

    David

    If this has been helpful
    - Please click on the *Add Reputation button at the bottom left.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  3. #3
    Registered User
    Join Date
    06-11-2018
    Location
    PH
    MS-Off Ver
    2016
    Posts
    3

    Re: Getting 'normal' working hours and 'night differential' hours- PLEASE HELP

    I tried this formula =MAX(0,MIN(E2,INT(C2)+1+"6:00")-MAX(C2,INT(C2)+"22:00")) which I saw on a previous post. Not allowed to post the link because I'm still a newbie. Anyway, the only problem I have is this formula is only applicable in date and time format while I only need time format. Also, theirs are computed in # of night differential hours only so I also need the number of 'normal' working hours.


    C2: 17:45 (Start)
    E2: 2:45 (Stop)
    *These numbers are in h:mm format extracted from a biometrics device.

    Hoping someone can help me with this. Thanks.

  4. #4
    Registered User
    Join Date
    06-11-2018
    Location
    PH
    MS-Off Ver
    2016
    Posts
    3

    Re: Getting 'normal' working hours and 'night differential' hours- PLEASE HELP

    I tried this formula =MAX(0,MIN(E2,INT(C2)+1+"6:00")-MAX(C2,INT(C2)+"22:00")) which I saw on a previous post. Not allowed to post the link because I'm still a newbie. Anyway, the only problem I have is this formula is only applicable in date and time format while I only need time format. Also, theirs are computed in # of night differential hours only so I also need the number of 'normal' working hours.


    C2: 17:45 (Start)
    E2: 2:45 (Stop)
    *These numbers are in h:mm format extracted from a biometrics device.

    Hoping someone can help me with this. Thanks.

  5. #5
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Getting 'normal' working hours and 'night differential' hours- PLEASE HELP

    This formula can get extremely complex. It depends on how much the hours vary - before and after midnight etc.

    Very simply, =IF(C2>=E2,(E2+1)-C2,E2-C2) will give you the elapsed time of 9 hours.

    For the scenario you posted, =IF(C2<=TIME(22,0,0),TIME(22,0,0)-C2) will give you the 4:15 Normal hours.

    This, however, is over simplified and probably won't work with lots of different times being entered. It will require multiple nested iff statements or helper columns. Sorry, but I am out of time to look further. at the moment.

    Regards,

    David

+ 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. [SOLVED] How to count hours for Night Differential (using IF function)
    By helpme10 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-30-2019, 05:07 PM
  2. Computing for number of hours under Night Differential
    By emanon132501 in forum Excel General
    Replies: 4
    Last Post: 09-24-2015, 02:13 AM
  3. [SOLVED] Compute Night Differential Hours
    By UnKnown_25 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 08-04-2015, 11:17 AM
  4. Replies: 3
    Last Post: 06-18-2014, 07:26 AM
  5. If time period falls outside of normal working hours how many hours does it add.
    By chrisdromey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2013, 11:56 PM
  6. Replies: 4
    Last Post: 09-21-2012, 12:58 AM
  7. Replies: 2
    Last Post: 07-27-2012, 04:54 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