+ Reply to Thread
Results 1 to 8 of 8

Calculate night shift hours on 24 hr schedule

  1. #1
    Registered User
    Join Date
    01-31-2019
    Location
    dallas, texas
    MS-Off Ver
    10
    Posts
    4

    Calculate night shift hours on 24 hr schedule

    I need to calculate night shift and day shift hours for a 24 hour schedule. Employees can clock in at any time during the day or night and often work more than 12 hour shifts (but not always). Night shift starts at midnight and ends at 8am. I need the formula to account for when the employee clocks in at 7pm and clocks out at 8:30am the following morning (for example), which would be 8 hours of night shift, 5.5 hours of day shift. Please and thank you in advance!!

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Calculate night shift hours on 24 hr schedule

    Solution will depend on your data layout and what's stored in each field/cell.

    I'd recommend uploading sample workbook (with desensitized info) that give enough examples along with your expected result (manually inputted).

    To upload, use "Go Advanced" button and click on "Manage Attachments" hyperlink. It will launch new tab/window for managing file uploads.

  3. #3
    Registered User
    Join Date
    01-31-2019
    Location
    dallas, texas
    MS-Off Ver
    10
    Posts
    4

    Re: Calculate night shift hours on 24 hr schedule

    Thank you for the advice! A sample spreadsheet is attached. I'm looking for a formula to calculate night hours and day hours separately, if possible.
    Attached Files Attached Files

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Calculate night shift hours on 24 hr schedule

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

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

    Re: Calculate night shift hours on 24 hr schedule

    Please try at D2
    =(B2>C2)+C2-B2)
    set custom format to [h]:mm

    Or this if you want hours with decimal
    =((B2>C2)+C2-B2)*24

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Calculate night shift hours on 24 hr schedule

    Assuming you have Bo_Ry's formula in D column (Total).

    For Day shift (E2)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    For Nightshift.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  7. #7
    Registered User
    Join Date
    01-31-2019
    Location
    dallas, texas
    MS-Off Ver
    10
    Posts
    4

    Re: Calculate night shift hours on 24 hr schedule

    Thank you!!!

  8. #8
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Calculate night shift hours on 24 hr schedule

    Glad we could help. If this solved your issue, please mark the thread as solved by using Thread tools found at top of your initial post

+ 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 calculate night shift hours?
    By jane_dm7 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-04-2023, 09:52 AM
  2. [SOLVED] Calculate hours during set times for night shift allowance
    By mbeire in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-14-2017, 09:32 PM
  3. Shift - Day and Night, working hours out
    By fwddesign in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-05-2016, 09:06 PM
  4. Excel how to calculate number of night shift hours?
    By testeret in forum Excel General
    Replies: 2
    Last Post: 07-15-2013, 11:42 AM
  5. [SOLVED] Spliting Day Shift and Night Shift Hours
    By Goldbadger2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2013, 01:16 AM
  6. Replies: 4
    Last Post: 09-21-2012, 12:58 AM
  7. [SOLVED] Need to calculate night shift hours
    By avdald in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-23-2012, 02:25 PM

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