Top 5 numbers in a range

Thehub

New Member
Joined
Aug 1, 2017
Messages
15
Office Version
  1. 365
Platform
  1. Windows
I have a table with 130 rows and 5 columns. Each cell contains an integer between 1 and 49 inclusive. No number is repeated within a row.

I need to find the top 5 different numbers within that range. Anyone help?
 
What exactly are you looking for?
The top 5 per row, the top 5 per column?
Hi. Thanks for looking. It is the top 5 or top 5 most frequent numbers in the range. For example, 39 may occur 20 times, then 2 occurs 18 times etc. And I do have the LET function
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
Excel Formula:
=LET(Rng,A1:E130,Seq,SEQUENCE(49),Qty,COUNTIF(Rng,Seq),AGGREGATE(15,6,Seq/(Qty>=LARGE(Qty,5)),SEQUENCE(5)))
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0
Couple of other options if you wanted it sorted, with or without the count
+Fluff v2.xlsm
ABCDEFGHIJ
1452717409NumberCountNumber only
2282813431423723
3373027473211611
453723112228528
5122291228949
6282248442316416
71018233635
823251521
931642331
10401953010
114513231136
122431221818
13104925146
14916162149
151915113721
163317282029
17113992336
18212711395
19242126716
20191333911
List
Cell Formulas
RangeFormula
G2:H6G2=LET(Rng,A1:E20,Seq,SEQUENCE(49),Qty,COUNTIF(Rng,Seq),Ary,CHOOSE({1,2},Seq,Qty),INDEX(SORT(Ary,2,-1),SEQUENCE(5),{1,2}))
J2:J6J2=LET(Rng,A1:E20,Seq,SEQUENCE(49),Qty,COUNTIF(Rng,Seq),Ary,CHOOSE({1,2},Seq,Qty),INDEX(SORT(Ary,2,-1),SEQUENCE(5),1))
Dynamic array formulas.
 
Upvote 0
Couple of other options if you wanted it sorted, with or without the count
+Fluff v2.xlsm
ABCDEFGHIJ
1452717409NumberCountNumber only
2282813431423723
3373027473211611
453723112228528
5122291228949
6282248442316416
71018233635
823251521
931642331
10401953010
114513231136
122431221818
13104925146
14916162149
151915113721
163317282029
17113992336
18212711395
19242126716
20191333911
List
Cell Formulas
RangeFormula
G2:H6G2=LET(Rng,A1:E20,Seq,SEQUENCE(49),Qty,COUNTIF(Rng,Seq),Ary,CHOOSE({1,2},Seq,Qty),INDEX(SORT(Ary,2,-1),SEQUENCE(5),{1,2}))
J2:J6J2=LET(Rng,A1:E20,Seq,SEQUENCE(49),Qty,COUNTIF(Rng,Seq),Ary,CHOOSE({1,2},Seq,Qty),INDEX(SORT(Ary,2,-1),SEQUENCE(5),1))
Dynamic array formulas.
Thanks. That's an even better solution.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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