Using Subtotals is much more flexible than I put in my previous post about Subtotals. I kept it compact because that is what I need to suit my needs in the work that I perform. Here I would like to expand – literally - the Subtotal function to show some other options that might help you do the work that you need to do.
I will start with a basic file; here it is before I do anything to it:
Now as before, go to the Data tab on the ribbon, and select the Subtotal Button:
Once you have that open, I will select At each change in Shipment Number, the Sum Function, and select subtotals for Discount, Net Amount, and Gross Amounts.
That way I will know the total cost of each shipment in my file. See the results below.
Now let’s add some other functions to the list to show you what can be done. Again select the Subtotal button, now, to add some other functions don’t forget to “Unclick” the check box beside Replace current subtotals. If you forget to uncheck this box, your new subtotals will show up and all your previous subtotals will disappear. So make sure you uncheck that box! While you are unchecking boxes, uncheck the previous Add subtotal to selections, in our case the Discount, Net Amount, and Gross Amount have all been unchecked.
Once that is unchecked you can add functions, I want to add count of Package Quantity.
Here are the results of that Subtotal:
I highlighted the first Subtotal results in green; the Count Subtotal I just completed in yellow. I now have the totals of the costs and the number of Packages in each shipment.
Now let’s add a subtotal for another column without deleting our existing subtotals. We will repeat our steps for setting up a subtotal, I am adding in the average of the weight, destination code and discount. Here is what we get (the newest is highlighted in blue.)
As you can see all of my subtotals are here for easy access and use. By clicking the numbers in the top left I can reduce my file so that all I am looking at is my subtotals, I have highlighted all of my subtotals to make it easy to see what I have done.
There are other functions that you can use within the Subtotal Function such as: Max, Min, Product, Count Numbers, Standard Deviation, Standard Deviation for the Population, Variance, and Variance for the Population. I am not going into these in this blog, but this should give you some ideas to start experimenting with. Play around with some different data and functions to see what you come up with. That is after all the best way to learn new things, experiment with your data.