Sort according to most repeated entries

  • Thread starter Roadtripper902902V3V
  • Start date
R

Roadtripper902902V3V

Hello,
How can I sort a column based on repetition.

For example,

Anna
Bob
Bob
Bob
Bob
Chuck
Chuck
Tiger
Tiger
Tiger
Tiger
Tiger
Tiger
Tiger
Sam
Sam
Sam



will be:

Tiger
Tiger
Tiger
Tiger
Tiger
Tiger
Tiger
Bob
Bob
Bob
Bob
Sam
Sam
Sam
Chuck
Chuck
Anna
 
D

Dave Peterson

I would insert a new column.

Then fill it with a formula like:
=countif(a:a,a1)
(and drag down as far as I need.)

Then sort the range by this column (primary key, descending) and the original
column (as the secondary key).
 
R

Roadtripper902902V3V

Thanks, Dave. Your "countif" formula worked.
It didn't seem necessary to do the "secondary key" sorting. All I did after
the getting the "countif" formula from top to bottom was just "sort" this new
column of countif values by largest to smallest.
Am I missing something?

Thanks.
 
D

Dave Peterson

If there are entries that show up with the same count, you may find those
entries mixed up.
 
Top