In this article, we will learn How to Add Subtotals to Primary and Secondary Fields in Excel.
Problem here is whenever we apply a new subtotal to the same data. Previous subtotal gets removed. For example the superstore manager needs the subtotal of Categories, subcategories and month wise sales and profit. Or finding the sum of profit earned by each sales employee each month. This kind of data problem can be solved by subtotal in Excel or using a pivot table. But here we learn how to solve it by Subtotals in Excel.
Subtotal option in Excel
If you need to aggregate and group data on the basis of categories and subcategories, use the Subtotal option in excel.
To add primary subtotal in Excel
Select the table and Go to Data > Subtotal > select the grouping column name > Choose Aggregate function > select the fields you need to subtotal (multiple) > Click OK.
To add secondary subtotal in Excel.
Select the table and Go to Data> Subtotal > Select secondary grouping column name > Choose Aggregate function > select the fields you need to subtotal (multiple) > Untick Replace current Subtotal > Click OK.
All of these might be confusing to understand. Let's understand how to use the function using an example. Here we have product unit sold data with month.
We will first group data based on the month. Select the table and Go to Data > Subtotal.
select the grouping column name > Choose Aggregate function > select the fields you need to subtotal (multiple) > Click OK.
You can see the month wise subtotal data in Excel. To add more subtotal.
Again Select the table and Go to Data> Subtotal > Select secondary grouping column name > Choose Aggregate function > select the fields you need to subtotal (multiple) > Untick Replace current Subtotal
Click OK and your data will be grouped under the secondary column.
As you can see your grouped data.
Here are all the observational notes using the formula in Excel
Hope this article about How to Add Subtotals to Primary and Secondary Fields in Excel is explanatory. Find more articles on calculating values and related Excel formulas here. If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at firstname.lastname@example.org.
Related Articles :
How to use the SUBTOTAL function in Excel : Apply aggregate functions like average, sum, count, max, min on the grouped data using the subtotal function in Excel.
How to Select Entire Column and Row Using Keyboard Shortcuts in Excel : Use Ctrl + Space to select whole column and Shift + Space to select whole row using keyboard shortcut in Excel
Paste Special Shortcut in Mac and Windows : In windows, the keyboard shortcut for paste special is Ctrl + Alt + V. Whereas in Mac, use Ctrl + COMMAND + V key combination to open the paste special dialog in Excel.
How to Insert Row Shortcut in Excel : Use Ctrl + Shift + = to open the Insert dialog box where you can insert row, column or cells in Excel.
How to use Shortcut Keys for Merge and Center in Excel : Use Alt and then follow h, m and c to Merge and centre cells in Excel.
How to use the Shortcut To Toggle Between Absolute and Relative References in Excel : F4 shortcut to convert absolute to relative reference and same shortcut use for vice versa in Excel.
Popular Articles :
How to use the IF Function in Excel : The IF statement in Excel checks the condition and returns a specific value if the condition is TRUE or returns another specific value if FALSE.
How to use the VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.
How to use the SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.
How to use the COUNTIF Function in Excel : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.