Counting with Multiples by sub group

tourless

Board Regular
Joined
Feb 8, 2007
Messages
144
Office Version
  1. 365
Platform
  1. Windows
Hi Folks.

I have column B with names, I have column E with department numbers. I need a way to count unique names grouped by department. I can figure out the counting unique values but can't work out the 'by department' part.
John01
John01
John01
Mary01
Mary01Dept 1: 2 names
Jim02
Jim02
Jim02
Bob02
Bob02
Kevin02
Kevin02Dept 2: 3names
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
How about
+Fluff 1.xlsm
ABCDEF
1NameDept
2John12
3John12
4John12
5Mary12
6Mary12
7Jim23
8Jim23
9Jim23
10Bob23
11Bob23
12Kevin23
13Kevin23
Data
Cell Formulas
RangeFormula
F2:F13F2=ROWS(UNIQUE(FILTER($B$2:$B$100,$E$2:$E$100=E2)))
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDEF
1NameDept
2John12
3John12
4John12
5Mary12
6Mary12
7Jim23
8Jim23
9Jim23
10Bob23
11Bob23
12Kevin23
13Kevin23
Data
Cell Formulas
RangeFormula
F2:F13F2=ROWS(UNIQUE(FILTER($B$2:$B$100,$E$2:$E$100=E2)))
That might work but when I try to apply your formula I receive an that states the functions isn't valid.
 
Upvote 0
In that case your version of Excel is well out of date. The Filter function was released to all 365 over a year ago.
 
Upvote 0
Try
Excel Formula:
=SUM(--(FREQUENCY(IF($E$2:$E$100=E2,MATCH($B$2:$B$100,$B$2:$B$100,0)),ROW($B$2:$B$100)-ROW($B$2)+1)>0))
You will probably need to confirm this with Ctrl Shift Enter
 
Upvote 0
In that case I would suggest that you update your profile to show 2016, rather than 365. ;)
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,194
Members
449,072
Latest member
DW Draft

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