Count unique references

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Hi

I have the following data. It may be one item, but referenced over several lines. I need to get a unique count :

1 - SINGLE
2 - SINGLE
3 - GROUP
3 - GROUP
3 - GROUP
4 - SINGLE
5 - GROUP
5 - GROUP
6 - SINGLE
7 - GROUP
7 - GROUP
7 - GROUP
7 - GROUP
7 - GROUP
8 - SINGLE

SINGLE COUNT = 5
GROUP COUNT = 3

Any ideas guys?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Would like it to be based on the reference if possible. I.e. if the reference appears more than once, then count it as a group item. This will prevent any errors where somebody has labelled a group as a single
 
Upvote 0
If your data a re in column A:B

C1: Single
C2: Group

In D1 copied down(Array formual, confirm CTRL+SHIFT+ENTER):


=COUNT(1/FREQUENCY(IF($B$1:$B$100=C1,MATCH($A$1:$A$100,$A$1:$A$100,0)),ROW($A$1:$A$100)-ROW(A1)+1))
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,543
Members
452,924
Latest member
JackiG

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