Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Sort according to most repeated entries

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sort according to most repeated entries

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).

Roadtripper902902V3V wrote:

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


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Sort according to most repeated entries

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.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sort according to most repeated entries

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



Roadtripper902902V3V wrote:

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.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I search for entries that are repeated in the workbook? Ivan Excel Worksheet Functions 4 May 23rd 07 02:17 AM
Printing text in a repeated cell/row that is longer than repeated Valerie Dyet Excel Discussion (Misc queries) 1 February 13th 06 03:27 AM
Sort Legend Entries Coolboy55 Charts and Charting in Excel 1 August 28th 05 01:27 AM
Identify repeated cell entries in multiple sheet workbook as you . Trigger Excel Discussion (Misc queries) 0 August 17th 05 01:57 AM
Filtering a column to exclude any repeated entries. bay Excel Discussion (Misc queries) 2 January 27th 05 10:13 AM


All times are GMT +1. The time now is 04:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"