List Values By Frequency

Pestomania

Active Member
Joined
May 30, 2018
Messages
292
Office Version
  1. 365
Platform
  1. Windows
Hello!

Let's say I have 1 column. I want to list Values from most frequented to least frequent.

Column B
1
5
6
9
11
12
9
9
5
5
5
1

I want column C to return the values in the order of frequency.

5
9
1
6
11
12

Is there a way to do this? I can't sort the column due to other columns.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Here you go. In C1:

=IFERROR(INDEX($B$1:$B$12,MODE(MATCH($B$1:$B$12,$B$1:$B$12,0)+{0,0})),"")

In C2:

=IFERROR(INDEX(B$1:B$12,MODE(IF(COUNTIF(C$1:C1,B$1:B$12)=0,MATCH(B$1:B$12,B$1:B$12,0)+{0,0}))),"")

Drag down until you get no more results. Both require CTRL-SHIFT-ENTER to enter into the cell.
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,124,996
Members
449,201
Latest member
Lunzwe73

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