+ Reply to Thread
Results 1 to 11 of 11

Need total sum of hours for each shift assigned to each taks and team

  1. #1
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Need total sum of hours for each shift assigned to each taks and team

    Is there an equation for this?

    Every day I would get a report and I have to manually filter to find out how many hours of each task are assign to each team per shift. Please see the template tab for an example.

    Definition
    7:00 AM shift = would sum 7:00am through 8:30am (column U through X)
    9:00 AM shift = would sum 9:00am through 10:30am (column Y through AB)
    11:00 AM shift = would sum 11:00am through 12:30pm (column AC trhoug AF)
    1:00 PM shift = would sum 1:00pm through 2:30pm (column AG through AJ)
    3:00 PM shift = would sum 3:00pm through 4:30pm (column AK through AN)
    5:00 PM shift = would sum 5:00pm through 6:30pm (column AO through AR)

    Other Team = include all teams except for TeamD

    Thank you in advance for your help.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Need total sum of hours for each shift assigned to each taks and team

    It would be better if you kept the same formats through-out.
    - Keep dates as dates...yours are text that looks like at date - not a big deal right now, but will cause problems if you want to start summaries by date
    - Keep times as times...you have real times on Template, but text that looks like time on Data

    It is always good practice to keep to the correct formats, otherwise formulas become complex trying to convert or accommodate mixed formats.

    I changed the "times" on Data sheet to be real times.
    Then on Template in B3, copied down, use this...
    =SUMPRODUCT((Data!$G2:$BB224)*(Data!$G$2:$BB$2>=Template!B$1)*((Data!$G$2:$BB$2<Template!D$1)*(Data!$C2:$C224=Template!$A3)*(Data!$B2:$B224<>"TEAMD")))
    You can copy this to all the "other team" columns as well.

    For the Team D columns, use this...
    =SUMPRODUCT((Data!$G2:$BB224)*(Data!$G$2:$BB$2>=Template!B$1)*((Data!$G$2:$BB$2<Template!D$1)*(Data!$C2:$C224=Template!$A3)*(Data!$B2:$B224="TEAMD")))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Need total sum of hours for each shift assigned to each taks and team

    Ford,

    Thanks for you reply. I've change the time on Data sheet to real times copy the formula to B3 on Template as you suggested but the value return "0".

    what am i doing wrong?

    can you please take a look?

    is it possible for you to upload an example using my data?

    thanks!

  4. #4
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Need total sum of hours for each shift assigned to each taks and team

    Please help! Can anyone tell me what i am doing wrong? why is the above equation return "0" instead of a value for me?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Need total sum of hours for each shift assigned to each taks and team

    Sorry for the delay in getting back tou you. See the arttached
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Need total sum of hours for each shift assigned to each taks and team

    So that is how you change time to "real" time. lol! thank you so much Ford!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Need total sum of hours for each shift assigned to each taks and team

    yuppers, the devil is in the detail, as they say Thanks for the feedback

  8. #8
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Need total sum of hours for each shift assigned to each taks and team

    Ford,

    Your equation works great! However, I just realize I need to count how many people in TeamD are working in each task at a giving shift. Please see attach data (2).xlsb for desire outcome. I mess around with COUNTIFS but the return value is more than what it is.
    My challenge is figuring out how to count only once if there a value from U88:X95 for Task1 for TeamD.

    Please help.

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

    Re: Need total sum of hours for each shift assigned to each taks and team

    Try in D3:

    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Quang PT

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

    Re: Need total sum of hours for each shift assigned to each taks and team

    Note that as with SUBTOTAL in formula, to get displaying results in sheet 'Template' make sure not to filter task column in sheet Data.
    For instant, task 1 in sheet 'Template' would displays 0 if filter for other task in sheet 'Data" is activated

  11. #11
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Need total sum of hours for each shift assigned to each taks and team

    Thanks Quang!

    your equation work perfectly. (no wonder my COUNTIFS did not work )

+ 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: 3
    Last Post: 07-21-2013, 05:45 PM
  2. Replies: 4
    Last Post: 09-21-2012, 12:58 AM
  3. [SOLVED] Two Dimensional VLOOK Up - Find Team Reporting to Shift
    By mvcp007 in forum Excel General
    Replies: 9
    Last Post: 09-17-2012, 01:39 AM
  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
  5. Calculating total shift hours in a schedule
    By mgandy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-30-2008, 10:52 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