How to Count Data Total Numbers in Groups by Excel?

In daily work, we often need to count the total number for something in different groups, for example count products sales in different seasons. When these products are saved in different groups, do we have a convenient way to do statistic? This article will show you a simple and intuitive way to count data in multiple groups by PivotTable in Excel.

First as we usually do, prepare a list or table for Product and Sales. See below:

Count Data Total Numbers 1

This is a quite simple table for statistic sales. We can see there are only three products. The sales are different on different dates. So how can we count the total sales for the two days? Let’s get started.

Count Data for Multiple Groups by A Pivot Table


Step 1: First, we need to insert a Pivot Table.

Click on Insert tab, PivotTable is displayed in the first place of Insert functions.

Count Data Total Numbers 2

Step 2: Click on PivotTable, now Create PivotTable is loaded.

Count Data Total Numbers 3

Step 3: In ‘Choose the data that you want to analyze’, check on ‘Select a table or range’, refer to the screenshot in step#1, we know the data range is from A1 to C7, so in ‘Table/Range’ field, we just select the range by mouse. After releasing the mouse, the area is automatically displayed in the textbox.

Count Data Total Numbers 4

Step 4: In ‘Choose where to place the PivotTable’, check on ‘New worksheet’ or ‘Existing worksheet’ depends on your requirement. In this case, for comparing with original table, we check on ‘Existing worksheet’ to make original table and PivotTable in the same worksheet. We insert PivotTable into cell A15 for example.

Count Data Total Numbers 5

Step 5: Click on OK. Now PivotTable Builder is loaded.

Count Data Total Numbers 6

Step 6: As we want to count the sales for products, so we drag Product to Rows field, Sales to Values field.

Count Data Total Numbers 7

Step  7: Then a new table is displayed. We can see the total sales for each product via the new table.

Count Data Total Numbers 8

Step  8: Obviously, we can edit PivotTable Builder and update table with more conditions. For example, we can drag Sales to Column field.

Count Data Total Numbers 9

Guess what table can we get? See below. We can get more details from below table.

Count Data Total Numbers 10

Above all, you can adjust PivotTable per your requirement, add or remove conditions to make the table meet your needs. In our life, we can use PivotTable to count data in different groups refer to above steps.

 

Related Posts

Fix #N/A Error For VLOOKUP From Another Sheet
vlookup from anther sheet not working1

This post will show you how to fix the #N/A error why it occurs when you extract values from another sheet using VLOOKUP function in Excel 2016,2013,2010 or other Excel versions. How can you correct a #N/A error in VLOOKUP ...

How To Remove Special Characters in Excel
remove special character2

This post will show you how to remove special characters from text strings in Excel. And I am going to introduce two ways to remove special characters (@&)#%$) from a string in Excel. Removing Special Characters using Power Query If ...

How To Insert Comments in Protected Worksheet in Excel
insert commetns in protected workshee3

This post will show you how to allow comments in a protected worksheet in Excel. You can easily to insert comments into cells in a normal worksheet in Excel, but if want to insert a comment in a worksheet that ...

How To Convert Text to Upper Cases(Using VBA) in Excel
convert text to upper cases1

This post will show you how to switch from lower case to upper case in Excel. and I am going to show you two different ways of converting text to upper cases using formula or VBA macro in Excel 2013,Excel ...

How To Hide Every Other Row in Excel (Using VBA)
hide every other row1

This post will show you how to hide alternate rows or columns in Excel or how to hide every third, fourth, fifth row or column in Excel. If you want to hide every other row in your current worksheet, how ...

How to Average Only Positive or Negative Numbers of a Range

Suppose both positive numbers and negative numbers exist in a table. If we want to know the average of only positive numbers in this table, we can create a formula to get average of all positive numbers with all negative ...

How to Sort Data but Keep Blank Cells in Excel

In daily work, if we sort data with blank cells included in the same column, these blank cells are listed at the bottom automatically after sorting. If we want to keep the positions of these blank cells unchanged and only ...

How to Copy and Paste Only Values and Ignore Formula

When we copy a cell applied with a formula, we copy the formula of the cell rather than copy the value showing in the cell. In this article we will introduce you the way to copy only value ignoring applied ...

How to Sort Date by Day of Week in Excel

Except sort data by “A to Z” (alphabetical order, for numbers from small to large), we can also sort data by date, month or year if these conditions are given. In this article, we will show you the way to ...

How to Select All Non-Blank Cells of a Range

In daily work, we may meet the cases that select all blank cells or non-blank cells of a range. You may know the way to select all blank cells as they are “blanks”. But for non-blank cells, they may contain ...

Sidebar