Counting unique number

madhatrs26

New Member
Joined
Apr 6, 2015
Messages
7
I have an issue with trying to find a formula that can count the unique number in a list. Here is the data so referencing column A and counting the unique number in column B.

USER_IDLABEL
axr6810321423846
axr6810321423846
axr6810321423859
mxf3580321423850
mxf3580321423852
mxf3580321423852
mxf3580321423852
mxf3580321423867
rxv8290321423851
rxv8290321423851
rxv8290321423864
tmj2550321423849
tmj2550321423849
tmj2550321423849
tmj2550321423861

<colgroup><col><col></colgroup><tbody>
</tbody>

Please assist with this problem.

Thank you much,

madhatter
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Welcome to the board, not shure if i understood what you need but try:


Book1
AB
1USER_IDLABEL
2axr681321423846
3axr681321423846
4axr681321423859
5mxf358321423850
6mxf358321423852
7mxf358321423852
8mxf358321423852
9mxf358321423867
10rxv829321423851
11rxv829321423851
12rxv829321423864
13tmj255321423849
14tmj255321423849
15tmj255321423849
16tmj255321423861
17
18
199
Sheet3
Cell Formulas
RangeFormula
A19{=SUM(1/COUNTIFS($A$2:$A$16,$A$2:$A$16,$B$2:$B$16,B2:B16))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Assuming that your data is in column B, this should work.

Code:
=SUM(1/COUNTIF(B1:B15,B1:B15))

Hit Ctrl + Shift + Enter
 
Upvote 0
I need to get a count of column B which is a label number just one criteria and using column A as a reference. Example would be USER_ID axr681 should have a count of 2 LABELS because in the example B2 and B3 are the same label number.
 
Upvote 0
Row\Col
A​
B​
C​
D​
E​
1​
USER_IDLABEL
2​
axr681
321423846​
axr681
2​
3​
axr681
321423846​
mxf358
3​
4​
axr681
321423859​
rxv829
2​
5​
mxf358
321423850​
tmj255
2​
6​
mxf358
321423852​

7​
mxf358
321423852​
8​
mxf358
321423852​
9​
mxf358
321423867​
10​
rxv829
321423851​
11​
rxv829
321423851​
12​
rxv829
321423864​
13​
tmj255
321423849​
14​
tmj255
321423849​
15​
tmj255
321423849​
16​
tmj255
321423861​

<tbody>
</tbody>


Row\Col
E​
2​
=SUM(IF(FREQUENCY(IF($A$2:$A$16=D2,$B$2:$B$16),IF($A$2:$A$16=D2,$B$2:$B$16))>0,1))​

<tbody>
</tbody>


Ctrl+Shift+Enter

Hope helps
 
Upvote 0
I need to get a count of column B which is a label number just one criteria and using column A as a reference. Example would be USER_ID axr681 should have a count of 2 LABELS because in the example B2 and B3 are the same label number.

Row\Col
A​
B​
C​
1​
USER_IDLABELCOUNT
2​
axr681
321423846
2​
3​
axr681
321423846
2​
4​
axr681
321423859
2​
5​
mxf358
321423850
3​
6​
mxf358
321423852
3​
7​
mxf358
321423852
3​
8​
mxf358
321423852
3​
9​
mxf358
321423867
3​
10​
rxv829
321423851
2​
11​
rxv829
321423851
2​
12​
rxv829
321423864
2​
13​
tmj255
321423849
2​
14​
tmj255
321423849
2​
15​
tmj255
321423849
2​
16​
tmj255
321423861
2​

C2, control+shift+enter, not just enter, and copy down:

=SUM(IF(FREQUENCY(IF($A$2:$A$16=A2,$B$2:$B$16),$B$2:$B$16),1))
 
Upvote 0
krykm your answer works only issue is that the leading zero's are required how can this formula work with a leading zero?

Thanks,

Madahtter
 
Upvote 0
Row\Col
A​
B​
C​
1​
USER_IDLABELCOUNT
2​
axr681
321423846
2​
3​
axr681
321423846
2​
4​
axr681
321423859
2​
5​
mxf358
321423850
3​
6​
mxf358
321423852
3​
7​
mxf358
321423852
3​
8​
mxf358
321423852
3​
9​
mxf358
321423867
3​
10​
rxv829
321423851
2​
11​
rxv829
321423851
2​
12​
rxv829
321423864
2​
13​
tmj255
321423849
2​
14​
tmj255
321423849
2​
15​
tmj255
321423849
2​
16​
tmj255
321423861
2​

C2, control+shift+enter, not just enter, and copy down:

=SUM(IF(FREQUENCY(IF($A$2:$A$16=A2,$B$2:$B$16),$B$2:$B$16),1))

krykm your answer works only issue is that the leading zero's are required how can this formula work with a leading zero?

Thanks,

Madahtter

If your labels are text numbers (not true numbers), control+shift+enter, not just enter, and copy down:
Rich (BB code):

=SUM(IF(FREQUENCY(IF($A$2:$A$16=A2,IF($B$2:$B$16<>"",
   MATCH($B$2:$B$16,$B$2:$B$6,0))),ROW($B$2:$B$6)-ROW($B$2)+1),1))
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,510
Members
448,967
Latest member
screechyboy79

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