Note: The other languages of the website are Google-translated. Back to English

How to sort data by the most frequent value in Excel?

Supposing you have a long list of data in your worksheet, and now you would like to sort this list by the frequency of which each word occurs. That is to say, the most common value (for example, occurs four times in the column) is listed first, and then be followed by the words which occur three times, twice and once as following screenshots shown. How could you solve this task in Excel?

Sort data by the most frequent value with a helper column

In Excel, there is no direct function for you to sort the data by frequency of occurrence at once, you need to count the occurrence of the values first, and then apply sort function in Excel.

1. Select a blank cell beside original column, and enter this formula =COUNTIF($A$2:$A$16,A2) into it, and then drag this cell's AutoFill Handle down to the range as you need. See screenshot:

Note: In the above formula, A2:A16 is the specified list where you will sort by frequency, and A2 is the first data of this list.

2. Keep selecting these formula cells, and click Data > Sort A to Z or Sort Z to A as you need. See screenshot below:

3. In the opening Sort Warning dialog box, please check the Expand the selection option, and click the Sort button. See screenshot above:

4. And now the original column has been sorted by the frequency already (see below screenshot). If necessary, please delete the added helper column.

Sort data by the most frequent value with Kutools for Excel

Actually, Kutools for Excel provides an directly workaround to sort any list/column by the frequency easily with the Advanced Sort utility. Please do as follows:

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Free Trial Now!

1. Select the list you need to sort by frequency, and click Kutools Plus > Sort > Advanced Sort. See screenshot:

2. In the popping up Advanced Sort dialog, please select the column which you will sort by frequency, choose Frequency from the Sort On drop down list, specify the Order you want, and click the Ok button. See screenshot:

Kutools for Excel's Advanced Sort utility provides us with much more flexible sorting methods: sort by text length, sort by last name, sort by absolute value, etc. Click to know more...

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now

Quickly find the most frequent text value or number in Excel

Generally, we can apply the MODE function to find the most frequent number in Excel. But how to get the most frequent text value from the specified range? Kutools for Excel’s Find most common value formula provides an easy way for you! Full Feature Free Trial 30-day!

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now


Kutools for Excel includes more than 300 handy tools for Excel, free to try without limitation in 30 days. Download and Free Trial Now!

Related articles:

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks for the excellent trick. Is helping me out in sorting the data of a major shipping port that I have which helps in bringing out super cool trivia stuff regarding that port! :D
This comment was minimized by the moderator on the site
DOES NOT WORK FOR ME!!!!!!!!!!!!!!!!!!!! If I give the =COUNTIF($A$2:$A$15,"="&$A2) - it does not count the values for me, but instead, it only writes the count of the data which is in the field A2!
This comment was minimized by the moderator on the site
Hi Vipera, That may happen if you've got the "$" symbol in the wrong place. To make sure you have it correct, type in the cell number (eg E2) and then press "F4" until the $ symbol is in the correct place. Alternatively, as you are only copying the formula down one column, you can leave the second cell number without the $ symbol and it should still work fine.
This comment was minimized by the moderator on the site
Just what I was looking for! I'm just having a little trouble with it still because my list is first and last names and it's only looking at the first word. So for example, if the first 10 names were "Taylor Swift", it's including "Taylor Morrisen" in the count. I'm still working on figuring it out but definitely worth including in this article! Thanks for posting (:
This comment was minimized by the moderator on the site
Not sure if my comment ever went through but I just figured out my goof! Thank you so much for posting this, it's exactly what I was looking for!!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0  Characters
Suggested Locations