Count workers hours: I think this is easy. I am just not seeing it!

baoldben

New Member
Joined
Nov 13, 2013
Messages
2
Hi there,

I created a workbook that I use as a schedule for all workers in my department. The department breaks out into 4 other sub departments. All employees are scheduled for either a 4 or 8 hour shift. I need to quantify the data in a number of ways, most of which I was able to write on my own, however I am having trouble with one specific quantification. I need to count how many 4 or 8 hour shifts in each sub department. i.e.


DeptNameMonTueWedThurFriSatSunTotal
CarpBob48884OFFOFF32
ElecJoe44448OFFOFF24
AVSam44484OFFOFF32
AudioRayOFFOFF4448424


Carps Total Hrs
4 hrs
8hrs
Elec Total Hrs
4hrs
8hrs
AV Total Hrs
4hrs
8hrs
Elec Total Hrs
4hrs
8hrs
[tr]

I was able to calculate the total hours of each department with Sumif. However I need to break out each department by 4 hrs and 8 hrs not with a total hour count but by the number of times they were scheduled for 4hrs i.e. Carp Bob was schedule for 2 4 hr shifts not 8 hours total. Does this make sense? I hope I am being clear. It seems like a simple formula that I can't seem to get my head around. Any help is appreciated.
 
Last edited:

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I would change the layout as follows but the Countif() principal is the same if you wish to retain the layout you have (you'll just need to do more work creating formula).

Excel 2010
ABCDEFGHIJKLM
1DeptNameMonTueWedThurFriSatSunTotal48OFF
2CarpBob48884OFFOFF32232
3ElecJoe44448OFFOFF24412
4AVSam44484OFFOFF32412
5AudioRayOFFOFF4448424412

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
K2=COUNTIF($C2:$I2,K$1)

<tbody>
</tbody>

<tbody>
</tbody>

Drag or copy K2 formula to required cells

Possibly, =COUNTIF($C2:$I2,K$1)*K$1 if you want separated tally of 4hr and 8hr shifts (the OFF is there as an example)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,421
Messages
6,119,392
Members
448,891
Latest member
tpierce

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