10 most frequently repeated numbers

juanam

New Member
Joined
Aug 1, 2021
Messages
28
Office Version
  1. 2021
Platform
  1. Windows
In a one column data range I have several numbers corresponding to bingo balls that have come out.
In that column I will continue to add future ball values.

I want to get the 10 most frequently repeated numbers.

I have used MODE. MULT function, but it only returns some values, I need the full 10 values, with the following numbers that have come out more frequently.

Sorry for my bad English, I speak Spanish and use google translator ☺️


bingo.xlsx
AB
1BALLSMODE
22525
36868
477
588
6750
768#N/D
88#N/D
925#N/D
1068#N/D
1125#N/D
127
138
1450
1550
1633
1779
1810
1965
2058
2137
2270
2378
2421
2536
2638
2732
2890
2916
3046
3164
3269
3352
3471
3526
3629
3784
3819
3940
4072
4117
4240
4333
4419
4572
4679
4710
4865
4958
5037
5170
5278
5321
5436
5538
5616
5746
5864
5969
6052
6171
6226
6329
6484
6550
6690
6732
6874
6914
706
7188
7231
7351
7445
7534
7613
7753
785
7980
8024
8185
8220
8311
8418
8549
861
8787
8815
8973
9042
9186
9235
9376
9463
9547
9666
9756
9862
994
10089
10157
10241
10382
10412
1059
10622
107
BINGO
Cell Formulas
RangeFormula
B2:B11B2=MODE.MULT(balls_range)
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Attachments

  • bingo.png
    bingo.png
    33.7 KB · Views: 21

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
One method

Excel Formula:
=INDEX(SEQUENCE(99);MATCH(LARGE(COUNTIF($A$2:$A$106;SEQUENCE(99))+(SEQUENCE(99)/1000);SEQUENCE(10));COUNTIF($A$2:$A$106;SEQUENCE(99))+(SEQUENCE(99)/1000);0))

With let:

Excel Formula:
=LET(x;COUNTIF($A$2:$A$106;SEQUENCE(99))+(SEQUENCE(99)/1000);INDEX(SEQUENCE(99);MATCH(LARGE(x;SEQUENCE(10));x;0)))
 
Upvote 0
Solution
One method

Excel Formula:
=INDEX(SEQUENCE(99);MATCH(LARGE(COUNTIF($A$2:$A$106;SEQUENCE(99))+(SEQUENCE(99)/1000);SEQUENCE(10));COUNTIF($A$2:$A$106;SEQUENCE(99))+(SEQUENCE(99)/1000);0))

With let:

Excel Formula:
=LET(x;COUNTIF($A$2:$A$106;SEQUENCE(99))+(SEQUENCE(99)/1000);INDEX(SEQUENCE(99);MATCH(LARGE(x;SEQUENCE(10));x;0)))
Sorry that it took me a while to respond because I had to translate the functions to my excel in Spanish.

The results are consistent, I see that it completes the other values that it could not get.

But I have seen that both formulas return me data that is repeated with the same frequency as others.

With what criteria do the formulas extract the numbers 90,84,79,78,72,71 that are repeated 2 times and not 50,17,33,10,37 that are also repeated 2 times?

That is, as long as there are several values that are repeated the same number of times (currently 2), will it choose only some at "random"?
 
Upvote 0
Yes, that is random in this case :)

PS: here an Excel formula translator as add-in
Ok thanks a lot for your help. (y)
But is there no other "safer" solution?
So I only see the numbers that MODE.MULT function does not extract.are the ones it choose randomly.
I know it is difficult to take a criterion for these missing numbers, another solution would be to take the numbers that have the same frequency and appear first but it would not be a safe formula anyway. ?

I think that until I add more data to the database I will not have a safe statistical solution. ?

Anyway, I will mark your answer as solved since you have taken the time to help me :)
 
Upvote 0
At the background, MODE.MULT is random as well for the numbers it is showing. It depends on the positions of the specific numbers in the dataset.
Since bingo is random, it will always be random which ball comes first ;)
 
Upvote 0
That's what I was thinking... :unsure:
If at one point I have +10 values that are repeated with the same frequency, MODE.MULT will choose 10 because that is what I requested ?

PS
Microsoft translator add-on could not translate the simpler formula "SEQUENCE" into Spanish, which in Spanish is "SECUENCIA".
All the others it translated well, even the most different "LARGE" than in Spanish is "K.ESIMO.MAYOR" ?
 
Last edited:
Upvote 0
At the background, MODE.MULT is random as well for the numbers it is showing. It depends on the positions of the specific numbers in the dataset.
Since bingo is random, it will always be random which ball comes first ;)
Excuse me @JEC , will it be possible to make a macro that copies 10 frequent numbers in another column and orders them from smallest to largest?

Or if it is possible that they are ordered in that same PLAY column without a macro, even better.

From what I see they are ordered from highest to lowest in the PLAY column and I want them ordered but in reverse.
 

Attachments

  • ordered.png
    ordered.png
    29 KB · Views: 19
Last edited:
Upvote 0
In that column I will continue to add future ball values.

It looks like you have already made column A into a formal Excel Table. That is a good idea as the formulas below will automatically adjust as new values are added.
I think that you can do all you want without the frequency column but I am a little unsure whether you only want exactly 10 numbers returned or if there are more with equal (10th) frequency if you want them returned as well.

I think that one of these should be what you want though.

In your sample 5 numbers occur 3 times. Those numbers are 7, 8, 25, 50, and 68
Then you have another 25 numbers that occur twice.

The formula in C2 below will ensure that those 5 values that occurred 3 times will be in the final list but then just choose enough of the numbers that occurred twice, starting from the smallest of those numbers, to make up to a total of 10 numbers.
If there was more than 10 numbers all with equal highest frequency this C2 formula would just choose the smallest 10 of those numbers.

The formula in D2 lists all the numbers that occurred 3 times or 2 times, since the 10th highest frequency is 2. The whole list is ordered from smallest to largest.

21 11 27.xlsm
ABCD
1BALLS10 Only10 plus equals
22577
36888
471010
581616
671919
7682121
882525
9252626
10685029
11256832
12733
13836
145037
155038
163340
177946
181050
196552
205858
213764
227065
237868
242169
253670
263871
273272
289078
291679
304684
316490
3269
3352
3471
3526
3629
3784
3819
3940
4072
4117
4240
4333
4419
4572
4679
4710
4865
4958
5037
5170
5278
5321
5436
5538
5616
5746
5864
5969
6052
6171
6226
6329
6484
6550
6690
6732
6874
6914
706
7188
7231
7351
7445
7534
7613
7753
785
7980
8024
8185
8220
8311
8418
8549
861
8787
8815
8973
9042
9186
9235
9376
9463
9547
9666
9756
9862
994
10089
10157
10241
10382
10412
1059
10622
10 most
Cell Formulas
RangeFormula
C2:C11C2=LET(D,Table1[BALLS],SORT(INDEX(UNIQUE(SORTBY(D,COUNTIFS(D,D),-1,D,1)),SEQUENCE(10))))
D2:D31D2=LET(D,Table1[BALLS],SORT(UNIQUE(FILTER(D,COUNTIF(D,D)>=LARGE(COUNTIF(D,UNIQUE(D)),10)))))
Dynamic array formulas.
 
Last edited:
Upvote 0
Hi @Peter_SSs I loved your ideas, I'm going to apply them along with mine.

Column B is not necessary I put it simply to see how often the numbers were repeated

Any solution for a macro that copies values calculated with my previous formula from column D (PLAY) to a right column E (ORDERED) and that orders them from smallest to largest automatically (see shared image).

I thought of a macro to avoid doing the work manually, unless you know a way to modify the matrix formula of column D so that the data is ordered from smallest to largest.

@JEC0's formula column D:
VBA Code:
=INDEX(SEQUENCE(99);MATCH(LARGE(COUNTIF($A$2:$A$106;SEQUENCE(99))+(SEQUENCE(99)/1000);SEQUENCE(10));COUNTIF($A$2:$A$106;SEQUENCE(99))+(SEQUENCE(99)/1000);0))
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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