Find top 10 Most common numbers in list

bscott05

New Member
Joined
May 3, 2011
Messages
7
Hello,

I have googled and searched all over for this.
Basically i am wanting to find the top 10 numbers that are repeated in a column.

I have a column with about 100-150 double digit numbers. I want to just find the most common numbers in the list and listed in order.. I have used the autofilter top 10 function but doesnt seem to be correct. am i just crazy or is there actually a different way to find the top 10 most repeated numbers?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
B2=MOD(LARGE(IF(MATCH(A$2:A$20,A$2:A$20,)=ROW(A$1:A$19),COUNTIF(A$2:A$20,A$2:A$20)*10^5+A$2:A$20),ROW(A1)),10^4)

Ctrl shift enter, copy down.
 
Upvote 0
yes, I do... I have a list of merchant ID's and I want to see the occurrence of the to 10. the merchant ID's are alphanumeric.

[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][/tr][tr][td]
1​
[/td][td]Text[/td][td][/td][td]
3​
[/td][td][/td][/tr]
[tr][td]
2​
[/td][td]london[/td][td][/td][td]
4​
[/td][td][/td][/tr]
[tr][td]
3​
[/td][td]avignon[/td][td][/td][td]Top N[/td][td]Count[/td][/tr]
[tr][td]
4​
[/td][td]roma[/td][td][/td][td]avignon[/td][td]
3​
[/td][/tr]
[tr][td]
5​
[/td][td]avignon[/td][td][/td][td]istanbul[/td][td]
3​
[/td][/tr]
[tr][td]
6​
[/td][td]avignon[/td][td][/td][td]london[/td][td]
2​
[/td][/tr]
[tr][td]
7​
[/td][td]istanbul[/td][td][/td][td]roma[/td][td]
2​
[/td][/tr]
[tr][td]
8​
[/td][td]istanbul[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
9​
[/td][td]istanbul[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
10​
[/td][td]milano[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
11​
[/td][td]roma[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
12​
[/td][td]london[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
13​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


C1: 3 (Replace with 10 in your workbook.)

Define A2:A12 as Text in Formulas | Name Manager.

Define Ivec in terms of the named range Tex in Formulas | Name Manager as referring to:

=ROW(Text)-ROW(INDEX(Text,1,1))+1

In C2 control+shift+enter, not just enter:

=IF(COUNTIFS(Text,"?*"),SUM(IF(FREQUENCY(IF(Text<>"",MATCH(Text,Text,0)),Ivec)>=LARGE(FREQUENCY(IF(Text<>"",MATCH(Text,Text,0)),Ivec),MIN(COUNTIFS(Text,"?*"),C1)),1)),0)

which is a self-adjusting Top N, based on C1.

In C4 control+shift+enter, not just enter, and copy down:

=IF($D4="","",INDEX(Text,SMALL(IF(FREQUENCY(IF(Text<>"",MATCH(Text,Text,0)),Ivec)=$D4,Ivec),COUNTIFS($D$4:D4,D4))))

In D4 control+shift+enter, not just enter, and copy down:

=IF(ROWS($D$4:D4)<=$C$2,LARGE(FREQUENCY(IF(Text<>"",MATCH(Text,Text,0)),Ivec),ROWS($D$4:D4)),"")
 
Upvote 0
what if the fields in column A is a string or alphanumeric?

Hi!

Try the Array Formula (use Ctrl+Shift+Enter to enter the formula) below too:

In C2 and copy down

=IFERROR(INDEX(A$2:A$20,MODE(IF(ISERROR(MATCH(A$2:A$20,C$1:C1,0)),MATCH(A$2:A$20,A$2:A$20,0)))),"")


[TABLE="class: grid, width: 182"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Text[/TD]
[TD][/TD]
[TD]Result[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]text01[/TD]
[TD][/TD]
[TD]text01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]text02[/TD]
[TD][/TD]
[TD]text02[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]text03[/TD]
[TD][/TD]
[TD]text03[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]text04[/TD]
[TD][/TD]
[TD]text04[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]text05[/TD]
[TD][/TD]
[TD]text05[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]text01[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]text02[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]text01[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]text02[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]text03[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]text04[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]text05[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]text03[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]text04[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]text05[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD]text06[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD]text07[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]text08[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]text09[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]***[/TD]
[TD]*******[/TD]
[TD]**[/TD]
[TD]*******[/TD]
[TD]**[/TD]
[/TR]
</tbody>[/TABLE]

I hope that the formula above helps.

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,520
Members
452,923
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