Skip to main content

How to count data by group in Excel?

Author: Sun Last Modified: 2014-09-05

In Excel, counting the data in a range may be easy for most of users, but how about counting the data in each group? There is no a direct way or formula to count data by group, but I can tell you a good way to quickly count data by group in Excel.

Count data by group with a pivot table


arrow blue right bubble Count data by group with a pivot table

If you want to count the data shown as below by group, you need to insert a pivot table.

doc-count-by-group-1

1. Select the data range, and click Insert > Pivot Table > Pivot Table. See screenshot:

doc-count-by-group-2

2. And in the Create Pivot Table dialog, you can specify to create it in a new worksheet or the existing worksheet. And if you check Existing Worksheet, you need to select a cell to place the pivot table. See screenshot:

doc-count-by-group-3

3. Click OK. And in the PivotTable Filed List pane, drag the header of column to Row Labels and Values section. See screenshot:

doc-count-by-group-4

Now the counting of each group are shown in the pivot table.

doc-count-by-group-5


Relative Articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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

Description


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!
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
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations