+ Reply to Thread
Results 1 to 10 of 10

Sum hours of each shift during given dates

  1. #1
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Sum hours of each shift during given dates

    User in my local excel forum needs to sum how many hours per shift during given range of dates, as following:

    A3: starting date
    B3: ending date
    C3: hours of shift 1
    D3: hours of shift 2
    E3: hours of shift 3

    with below example:
    Please Login or Register  to view this content.
    The range of dates may be within 1 day, over 1 month or over 1 year.

    I am in stuck for a while and need something to start with.

    Thanks in advance.
    Attached Files Attached Files
    Quang PT

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: Sum hours of each shift during given dates

    Not sure if this could solve the problem...
    Attached Files Attached Files

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Sum hours of each shift during given dates

    Sorry azumi, it did not work.
    Shift 1,2,3 return 0,1,1 (hours) while 58:30, 24:00, 26:25 is expected.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Sum hours of each shift during given dates

    Hi bebo,

    Sorry, but I don't understand how you arrive at your expected results. Could you clarify?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Sum hours of each shift during given dates

    Thank XOX LX,
    For example:

    From A3= 01/04/2014 3:35:00
    To B3= 05/04/2014 16:30:00

    I need to sum number of hours spent through out
    i.e, for Shift 1: from 6:01 to 18:00

    01/04/2014: 12 hours (from 6:01 to 18:00)
    02/04/2014: 12 hours (from 6:01 to 18:00)
    03/04/2014: 12 hours (from 6:01 to 18:00)
    04/04/2014: 12 hours (from 6:01 to 18:00)
    05/04/2014: 10.5 hours (from 6:01 to 16:30)

    Total: 58.5 (or 58:30) hours for this shift.

    Similar to shift 2 and 3.

    Hope it make sense.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Sum hours of each shift during given dates

    Here.. I've just changed order so lowest times are first. This way you can just change times in header to get other values.
    Attached Files Attached Files

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Sum hours of each shift during given dates

    Thank, zbor. I'll give it a try.

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Sum hours of each shift during given dates

    @Zbor,
    Almost done. Except:
    A3=01/04/2014 3:35:00 AM
    B3=05/04/2014 5:30:00 AM
    G3 (6:01 to 18:00) = 47:30

    I expect G3 to be 4 days (1,2,3,4/04/2014) * 12 hours = 48:00

    Any sugesstion?

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Sum hours of each shift during given dates

    Here:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Change ; to ,

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Sum hours of each shift during given dates

    Thanks zbor. It works like a charm.

+ 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] Spliting Day Shift and Night Shift Hours
    By Goldbadger2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2013, 01:16 AM
  2. Replies: 4
    Last Post: 09-21-2012, 12:58 AM
  3. Replies: 0
    Last Post: 05-14-2012, 05:36 PM
  4. Calculating Hours Worked from Shift Begin and Shift End
    By lukeflegg in forum Excel General
    Replies: 5
    Last Post: 08-12-2011, 03: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