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
- Sort data by the most frequent value with Kutools for Excel
- Find the most frequent text value or number from a list/column
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 - Packed with over 300 essential tools for Excel. Enjoy permanently free AI features! Download 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 - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! 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!
Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now
Demo: Sort Data By The Most Frequent Value In Excel
Related articles:
How to sort email address by domain in Excel?
How to sort or filter data by strikethrough in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
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!