跳到主要內容

如何按Excel中最頻繁的值對數據進行排序?

假設您的工作表中有一長串數據,現在您想按每個單詞出現的頻率對該列表進行排序。 也就是說,首先列出最常見的值(例如,在該列中出現四次),然後緊跟其後的單詞出現三遍,兩次和一次,如下面的屏幕截圖所示。 您如何在Excel中解決此任務?


使用幫助程序列按最頻繁的值對數據進行排序

在Excel中,沒有直接函數可以按出現頻率對數據進行一次排序,您需要先計算值的出現次數,然後再在Excel中應用排序函數。

1。 選擇原始列旁邊的空白單元格,然後輸入此公式 = COUNTIF($ A $ 2:$ A $ 16,A2) 放入其中,然後根據需要將該單元格的“自動填充手柄”向下拖動到該範圍。 看截圖:

備註:在以上公式中, A2:A16 是您要按頻率排序的指定列表,而A2是此列表的第一個數據。

2。 繼續選擇這些公式單元格,然後單擊 數據 > 將A到Z排序 or 將Z排序到A 根據需要。 參見下面的截圖:

3。 在打開的“排序警告”對話框中,請檢查 擴大選擇 選項,然後單擊 分類 按鈕。 參見上面的截圖:

4。 現在,原始列已經按照頻率進行了排序(請參見下面的屏幕截圖)。 如有必要,請刪除添加的幫助器列。


使用Kutools for Excel按最頻繁的值對數據進行排序

實際上,Kutools for Excel提供了一種直接的解決方法,即可以輕鬆地按頻率對任何列表/列進行排序 高級排序 效用。 請執行以下操作:

Excel的Kutools - 包含 300 多個 Excel 基本工具。 享受全功能 30 天免費試用,無需信用卡! 現在下載!

1.選擇您需要按頻率排序的列表,然後單擊 Kutools 加 > 排序>高級排序。 看截圖:

2.在彈出 高級排序 對話框,請選擇要按頻率排序的列,然後選擇 頻率 來自 排序 下拉列表中,指定 過往訂單 您想要的,然後單擊確定按鈕。 看截圖:

Kutools for Excel的 高級排序 實用程序為我們提供了更靈活的排序方法:按文本長度排序,按姓氏排序,按絕對值排序等。 點擊了解更多...

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

快速在Excel中查找最常用的文本值或數字

通常,我們可以應用MODE函數在Excel中查找最頻繁的號碼。 但是如何從指定範圍獲得最頻繁的文本值呢? Kutools for Excel的 尋找最普遍的價值 配方為您提供了一種簡便的方法!



Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!


演示


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

相關文章:

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi there,

I am trying to sort the contents of an excel table in terms of the maximum number of "Yes" values that each row has in columns F to M of the table.

For example if row 36 has "Yes" in B, C, D, E and F (let us simplify and say this is the maximum number of "Yes" values), then row 36 should be at the top. If row 2 has "Yes" values in only B, D and E, then it should come after row 36: row 36 has 5 "Yes" values, row 2 has 3.

How do I do this? I am using excel on a mac, if that makes a difference. Thanks very much!!
This comment was minimized by the moderator on the site
Hi All

In this solution after getting occurrence ,rest of the sorting i want to do with excel 2016 formula

can anyone help me ...how we can sort with using 2016 version formula only
This comment was minimized by the moderator on the site
Hello, singh,
If you want to use a formula to sort the data, you can use the Sort function, but, this function is only available for Excel 365 and later versions.
=SORT(array, [sort_index], [sort_order], [by_col])

To get more detaied information of this function, the below article can help you!
https://www.extendoffice.com/excel/functions/excel-sort-function.html

Please have a try, thank you!
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!!
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
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
Remove a dollar sign on 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
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
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations