Dynamic Counting Formula

beeehop

New Member
Joined
Oct 12, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have this pivot table:

Capture.PNG


In column D, I'd like a formula that counts Employee Names in column C grouped by column B.

For example, in the picture above, Senior Consultant April Thomas will have the number 8 - a count of employees under her.

Is there a formula to count occupied cells in one column up until a value exists in another column?

Here's what I thought up so far and I am stuck:
Capture1.PNG
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
It should be easy if you have the Senior Consultant on every line, then you can just use the FILTER().
 
Upvote 0
Also, this looks like a Pivot Table, you can probably just FILTER() on the original data set.
 
Upvote 0
Welcome to the MrExcel board!

Could you use something like this?

23 10 13.xlsm
BCD
1
2
3
4ConsultantNameCount
5aName 14
6Name 2 
7Name 3 
8Name 4 
9bName 51
10cName 67
11Name 7 
12Name 8 
13Name 9 
14Name 10 
15Name 11 
16Name 12 
17dName 134
18Name 14 
19Name 15 
20Name 16 
21
Count
Cell Formulas
RangeFormula
D5:D20D5=IF(B5="","",COUNTA(C5:C$1000)-SUM(D6:D$1000))
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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