count unique for each

deb

Active Member
Joined
Feb 1, 2003
Messages
400
excel 2010


I need to count the unique ProjectName (column B) for each ProjectID (column A) and enter it in column C

i.e. MD has 1 unique name, BW has 2 unique names...

.........A...........B..........C
1......MD.......McDan.....1
2......MD.......McDan.....1
3......BW.......Bill..........2
4......AF........Alf...........1
5......BW.......Billie........2
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
another question

What if I wanted to also check the ProjectNames on the NCC sheet. they are in column F
 
Upvote 0
AB...FResult1Result2
MD
McDan...Something21
MDMcDan...Different21
etc..

<tbody>
</tbody>

Are you saying the table is laid out like this and you want to also check if F is the same? It would be:

Result1:
Code:
=SUM(COUNTIFS(B:B,"<>"&B1,A:A,A1), COUNTIFS(F:F, "<>"&F1,A:A, A1)) + 1

Result2:
Code:
=COUNTIFS(B:B,"<>"&B1,A:A,A1,F:F, "<>"&F1) + 1
 
Upvote 0
@deb;4116752

Row\Col
A​
B​
C​
1​
MDMcDan
2​
2​
MDMcDan
2​
3​
BWBill
2​
4​
AFAlf
1​
5​
BWBillie
2​
6​
MDMcZad
2​

C1, control+shift+enter, not just enter, and copy down:
Rich (BB code):

=SUM(IF(FREQUENCY(IF($A$1:$A$6=$A1,IF($B$1:$B$6<>"",
   MATCH($B$1:$B$6,$B$1:$B$6,0))),ROW($B$1:$B$6)-ROW($B$1)+1),1))
 
Upvote 0
F is the column on sheet named NCC that also contains Project Names that I must count the uniques

Trying to do the 2 birds and one stone thing...

there are 2 sheets that contain the project Names. I want to count the unique Names on both sheets. The ProjectID is only on the first sheet.



.........A...........B..........C
1......MD.......McDan.....1
2......MD.......McDan.....1
3......BW.......Bill..........3
4......AF........Alf...........2
5......BW.......Billie........3

Sheet NCC
1......BW.......Bob.........3
2......AF........Alfred......2
 
Upvote 0
Is MD a project and McDan a name? You talk about ProjectID but there is no header ProjectID, no headers at all for that matter.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,485
Members
448,967
Latest member
visheshkotha

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