跳到主要內容

如何在Excel中按組統計數據?

在Excel中,對大多數用戶而言,對范圍內的數據進行計數可能很容易,但是對每個組中的數據進行計數又如何呢? 沒有直接的方法或公式來按組對數據進行計數,但是我可以告訴您一種在Excel中快速按組對數據進行計數的好方法。

使用數據透視表按組對數據進行計數


箭頭藍色右氣泡 使用數據透視表按組對數據進行計數

如果要按組統計如下所示的數據,則需要插入數據透視表。

文檔計數按組 1

1.選擇數據范圍,然後單擊 插入 > 數據透視表 > 數據透視表。 看截圖:

文檔計數按組 2

2.在 創建數據透視表 對話框,您可以指定在新工作表或現有工作表中創建它。 如果你檢查 現有工作表,您需要選擇一個單元格來放置數據透視表。 看截圖:

文檔計數按組 3

3。 點擊 OK。 而在中 數據透視表歸檔列表 窗格,將列的標題拖到 行標籤價值觀 部分。 看截圖:

文檔計數按組 4

現在,每個組的計數都顯示在數據透視表中。

文檔計數按組 5


相關文章:

最佳辦公生產力工具

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

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

kte選項卡201905


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, Han, I did not find a formula can directly count several specific words in a cell, but I have a formula that can count one word such as colorful in a cell, then you can count other words one by one, then use SUM function to get the total number.
=(LEN($B$2)-LEN(SUBSTITUTE($B$2,C1,"")))/LEN(C1)
https://cdn.extendoffice.com/images/stories/comments/sun-comment/doc-count-specific-words.png
This comment was minimized by the moderator on the site
How to count specific words in a pharagraph ?
There are tens of pages explain word counting for only "1" specific word. But there is NO any answer about my question. So;

Lets say;

*In A1 to A6 (A1, A2, A3,A4,A5,A6) there are some specific words. ( colorful, single, double, triple, positive)

*And there is B1 cell which has a pharagraph. >>> Hello. I am a person thinking positive. My life is colorful.How about your life ?

*In C1 cell, I want to see how many of the words from A1 to A6 cells, in B1 cell (the pharagraph) has been used ?

Is there someone who can create a formula for this ? I could not find any answers to this question.
This comment was minimized by the moderator on the site
Thanks Sir!
Very helpful
This comment was minimized by the moderator on the site
Works brilliantly! Thanks
This comment was minimized by the moderator on the site
This is excellently clear and I commend you for posting this. But it does not work. I wonder if you simply cut and pasted the content from somewhere and actually know how to do this. You just wasted a lot of my time. I am apparently not the first one. You should take this down.
This comment was minimized by the moderator on the site
Doesn't work.
This comment was minimized by the moderator on the site
Thank you very much!
This comment was minimized by the moderator on the site
does not work does not work does not work does not work does not work does not work does not work does not work
This comment was minimized by the moderator on the site
if there is multiple sheet in excel when what will do ?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations