Subtotaling Unique Hours Worked Categories

peterman25

New Member
Joined
Jul 6, 2016
Messages
11
My challenge is that I am trying to subtotal all of the hours worked by unique category/cost center. I've been trying to get it to work with SUMIFS and/or VLOOKUPS, etc. and continue to struggle.

In my timesheet the cost centers are all chosen by a dropdown. There's approximately a dozen different departments an employee could be assigned to and chosen in that dropdown. They typically work the same departments for the week, but it is entirely possible to work in 3-6 different departments during the week and then work in entirely different departments the following week. And then add on top of that any type of leave category chosen or something like OT.

As you can see, the original design has a TOTAL HOURS column, but that is just a formula that assumes that the rows/cost centers don't change from week to week.

Does this need to be handled in multiple columns with multiple formulas? I can use the UNIQUE function to get my unique cost centers, but even that requires more columns because the range is broken into 2 ranges with a blank line and a first week total hours line in the way. My ultimate goal would be to have it list and subtotal the UNIQUE cost centers in one column.

Any help is greatly appreciated. Thank you.
 

Attachments

  • Timesheet Example.jpg
    Timesheet Example.jpg
    145.2 KB · Views: 21

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
It would appear the following formula for Cell M15 should be able to produce the results desired, assuming your data on the screenshot begins on Cell A1:
Excel Formula:
=SUMIFS($K$3:$K15,$A$3:$A15,$A15)
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top