Subtotaling on more than 1 criteria

elb1999

New Member
Joined
Sep 20, 2005
Messages
48
Trying to count the number of employees in deparments, that roll up into cost centers, then get the count of the employees in the cost center
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,941
Can you maybe post a screenshot of your data or better explain what columns are used and how this data is laid out? You would either need to use a variation of sumproduct(), but would need data to put into the formula or do a search for sumproduct on the board.
 
Upvote 0

elb1999

New Member
Joined
Sep 20, 2005
Messages
48
Data is laid out in columns, with column A being the employee, various other employee info in other columns. The 2 column I wish to count and sum are cost center and department. Every employee is in a cost center, so that column is populated for each employee. If a cost center has multiple departments then the dept column will be populated. If a cost center doesn't have departments the department column will not be populated. I want to count the # of employees in the departments, then roll up of count of the employees in the related cost center, as well as counting employees in cost centers without departments
 
Upvote 0

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,941
Here is a basic example since you did not provide much detail:

Note that ranges cannot be whole columns and must be of same size.
Book1
ABCD
1NameCostCenterDeptAmount
2Name1934854775Dept19.5
3Name2934854775Dept23.36
4Name3934854775Dept25.62
5Name4934854775Dept21.39
6Name5984577443Dept29.39
7Name6984577443Dept37.96
8Name7984577443Dept38.35
9Name8984577443Dept25.39
10Name9984577443Dept36.28
11Name10984577443Dept38.77
12Name119456845835.86
13Name129456456456.79
14Name139645656458.39
15Name149645656454.55
16Name159645656453.38
Sheet3
Book1
GHIJ
1CostCenterDeptCountofEmployeesSum
2934854775Dept119.5
3934854775Dept2310.37
4984577443Dept2214.78
5984577443Dept3431.36
694568458315.86
794564564516.79
8964565645316.32
Sheet3

Hope that heps.
 
Upvote 0

Forum statistics

Threads
1,191,234
Messages
5,985,435
Members
439,965
Latest member
mcsmith1974

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
Top