+ Reply to Thread
Results 1 to 5 of 5

Equation for a summary table of hours worked

  1. #1
    Registered User
    Join Date
    06-11-2010
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    2

    Exclamation Equation for a summary table of hours worked

    Hi!

    I own a small business where we get work orders of work to do and we have to predict the hours that an employee will be working on a certain work order, based on three roles. The hours are spread up on 4 periods.

    What I want to do is create an Hour summary chart to inicate how many hours per period an employee has worked (independant of the role since an employee can be assigned more than role) on a certain work order.

    I have included an example of what I currently have, which doesnt work. I have some programming knowledge so I would be comfortable with these solutions as well.

    In the example, the first table is to keep track of work orders, and who has what role. The second table is the report I would like to produce. As it stands, I use SUM (IF (role1), if(role2),if(role3)) to add all hours within a period, but to add a new work order, I have to add 4 lines, copy my equation to the 4th line added, and delete the first 3 so that the fields keep corresponding.

    If this isnt clear, ask questions and I will answer as best as I can. Thank you!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Equation for a summary table of hours worked

    In C24, dragged right;
    =SUMIF($E$7:$E$9,$F$20,G$7:G$9)
    In C25
    =SUMIF($E$11:$E$13,$F$20,G$11:G$13)
    In C26
    =SUMIF($E$15:$E$17,$F$20,G$15:G$17)
    Does that work for you?
    Last edited by ChemistB; 06-11-2010 at 04:41 PM. Reason: Fixed formulas
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    06-11-2010
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Equation for a summary table of hours worked

    Thanks for that idea. However, the equation itself is not the problem, its the fact that I have to add 4 lines in order to copy my equation to the 4th line, and then delete the other3 for each new work order if I want my equation to correspond to the proper cells.

    Any ideas? Could this be programed with macros?

  4. #4
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: Equation for a summary table of hours worked

    You (to be continued in a few minutes)
    You either quit or become really good at it. There are no other choices.

  5. #5
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: Equation for a summary table of hours worked

    You can use INDIRECT function with a combination of other imputs, but the simplest way is probably with a macro. I'd move your totals row (in cells B27:F27) to the top of the table (say to B23:F23) and have it sum 10 to 100 rows or however many you need.

    Then delete all the $ signs from row 24 except for the F20 link. Delete rows 25 and 26. Start recording a macro.

    - select row 24 and copy it
    - paste it 4 rows down
    - cut it and paste it to row 25
    - stop macro recording

    this achieves recording work order 2 only, though you need to modify the macro, so that it knows how many rows of workorders you have and have it step one row down each time you record, otherwise you'll be always recording to row 25.

    Attached is an example of how to do this stepping process. See if you can use the code and modify it to fit your spreadsheet.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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