+ Reply to Thread
Results 1 to 9 of 9

SUM the split of working hours to another spreadsheet??

  1. #1
    Registered User
    Join Date
    01-24-2017
    Location
    Glasgow
    MS-Off Ver
    365
    Posts
    82

    SUM the split of working hours to another spreadsheet??

    I have 2 spreadsheets where one provides me with total hours for each member of staff while the other gives me the split of the same hours i.e. Ash worked 15 hours while the other confirms 6 hrs regular, 2 hours standard, 4 hours overtime, 2.5 hours travel, 0.5 hours unpaid. The first sheet provides a monthly total and the 2nd sheet gives a daily breakup (example attached - Sheet A).

    I want to be able to SUM all the daily hours for each person using multiple criteria - year, month, employee number to bring back each of the types of hours (Regular, Standard, Overtime, Travel, and Unpaid). I cannot use the persons name as we have multiple staff who have the same name so I have been using their unique employee number instead.

    I have put the sample data through a pivot table to get the monthly totals in the test sheet but need to pull this through to a new workbook (lets just call it Sheet B).

    What is the best solution? Should I use the pivot table data and then pull the date over to a new spreadsheet using GETPIVOTDATA? If so what is the best way to do so as it needs to be handle a large number of staff members and multiple criteria so needs to be dynamic? People I have spoken to have suggested using SUMIF and reference the original data and not use the PIVOT at all but I am planning on doing dynamic pivot charting and the pivot table option does a lot of the calculations better and leave less room for errors.

    I have attached the sample sheet.

    Thanks you in advance.
    Attached Files Attached Files
    Last edited by BigErnKingpin; 08-26-2019 at 04:07 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: SUM the split of working hours to another spreadsheet??

    In E3, copied across and down??

    =SUMIFS(Daily!$I:$I,Daily!$A:$A,Monthly!$B3,Daily!$B:$B,Monthly!$A3,Daily!$E:$E,Monthly!$D3,Daily!$K:$K,Monthly!E$2)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    01-24-2017
    Location
    Glasgow
    MS-Off Ver
    365
    Posts
    82

    Re: SUM the split of working hours to another spreadsheet??

    Hi Glenn

    Aye that works but what if I wanted to pull the same data onto a completely different spreadsheet or use the PIVOT table option?

    Thanks

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: SUM the split of working hours to another spreadsheet??

    Two key observations:

    1. You should never have a dataset that relies on multiple fields to identify an individual: no matter how hard you try, this can (and eventually will) lead to duplication and then misidentification of an individual. Add a table to your dataset with a list of individuals and give them a unique ID, then apply this ID to any 'transaction involving that individual.

    2. If you downloaded and installed the PowerQuery add-in, you could bring the data from the source file into a new file in the format you want.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    01-24-2017
    Location
    Glasgow
    MS-Off Ver
    365
    Posts
    82

    Re: SUM the split of working hours to another spreadsheet??

    Hiya AliGW. Good to see you again.

    Each of the staff members does have a unique identifier. I could not use their names as we have multiple staff with the same name but each has a unique employee number. What I do need to do however is use multiple criteria in order to bring back the correct data for each person for each month for their Regular, Standard, Overtime, Travel, and Unpaid hours, which Glenn has provided one solution. I was looking to see if this could be achieved using the pivot option and pulling this data over to a completely different spreadsheet.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: SUM the split of working hours to another spreadsheet??

    You will then need a) to stop using a structured table and b) use SUMPRODUCT.

    See file. Download both to same location. You may need to change the path. It may be OK to use Named Ranges to pick up the source data in a dynamic way. I never use Pivot Tables any more - Remembering to refresh them is too complicated for my wee brain.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-24-2017
    Location
    Glasgow
    MS-Off Ver
    365
    Posts
    82

    Re: SUM the split of working hours to another spreadsheet??

    Hiya Glenn,

    Aye this is more what I had in mind if the PIVOT option was not deemed fit for purpose. Seeing as how you can ace these formulas while I struggle what does that say about my wee brain? lol

    Cheers for the help mate!

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: SUM the split of working hours to another spreadsheet??

    LoL. I was once the "King of the Pivot Table" in work, but drifted away from using them in favour of dynamic formulae. Incidentally, don't use whole column ranges with SP. But you could also make them more future-proof by extending the range to 1000... or other sensible end point.

  9. #9
    Registered User
    Join Date
    01-24-2017
    Location
    Glasgow
    MS-Off Ver
    365
    Posts
    82

    Re: SUM the split of working hours to another spreadsheet??

    I think I'll get that on my tombstone....Here Lies the "King of the Pivot Table", it was his only forte, cruelly snatched away by Glenn lol

    Cheers again for your help mate

+ 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: 2
    Last Post: 12-05-2018, 01:46 AM
  2. [SOLVED] Split hours to Reg and OT hours and create a Summary
    By prkhan56 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-16-2015, 01:04 PM
  3. Working hours - identify and split in different rewards shifts
    By bartho87 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-05-2014, 12:11 PM
  4. Replies: 3
    Last Post: 10-10-2013, 10:15 PM
  5. Elapsed working hours, without counting weekends or non-working hours
    By ebkiwi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2013, 04:18 PM
  6. [SOLVED] Calculate hours with predefined Working Hours and Weekend Hours
    By garciapliz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-05-2013, 11:17 AM
  7. Replies: 2
    Last Post: 06-14-2013, 10:45 AM

Tags for this Thread

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