Applying multiple Subtotals to your Excel table

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:

Basic file before subtotals

Now as before, go to the Data tab on the ribbon, and select the Subtotal Button:

Open Subtotals by clicking on this 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.

Choose subtotal settings

That way I will know the total cost of each shipment in my file. See the results below.

See subtotal results

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.

Make sure you unselect previous columns and Replace current subtotals box

Once that is unchecked you can add functions, I want to add count of Package Quantity.

Add functions to existing subtotals

Here are the results of that Subtotal:

Highlight result after adding new functions

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

We add a new column and highlight new results

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.

Select subtotal level number and highlight the results

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.


See also

20 Responses to "Applying multiple Subtotals to your Excel table"

  1. Tatiana says:

    Exactly what I needed. Thank you!!!

  2. Gautam says:

    Very helpful, took care of my work need handily. THANKS,

  3. Scott Eaton says:

    Is there a way to check off all columns in one shot, other than each column one at a time. I have a YTD report that have 36 columns I have to check off one at a time when I do the subtotal and it would be great to just "check all", then take out about 5 columns, rather than check off 36. Any one know how to do that or if possible? Thank you.

    Scott Eaton

  4. Melissa says:

    Thank you so much! It was the tips I was looking for!!

  5. Jay says:

    Very helpful

  6. Ravi Lele says:

    Very helpful.

  7. Anonymous says:


  8. Ayham Mhd says:

    Thanks a lot bro...

  9. Sanjeev says:

    Very much helpful.
    Thanks a lot..

  10. Danielle says:

    Is there a way to condense the number of rows the subtotals takes up? So that it's not one row for the total, another for the average, etc.? I'm trying to condense my report so I don't have 'Total' and 'Average' after every change in value; I'd like the subtotals to go on the same line since one of the values I need an average for instead of a sum.

  11. Raj Mukherjee says:

    Useful tip. Thanks

  12. Anonymous says:

    Is there a way to subtotal by shipment number and service in case you had different services within the same shipment? It doesn't appear that you can have multiple criteria in the "At Each Change" box?

  13. writwika says:

    good evening, can you please help me out to create a macro for the example below:
    =156.71+43.51... it will be a great help.

  14. Rajkumar says:

    Thanks, its very use full

  15. sangeeta says:


    how to highlight different subtotals with different colors when the data is large


  16. neelam says:

    Thank u helps me a lot

  17. saurabh purkar says:

    Exactly what I needed. Thank you!!!

  18. LAILA says:

    Thank you - this was valuable.

Post a comment

Unfortunately, due to the volume of comments received we cannot guarantee that we will be able to give you a timely response. When posting a question, please be very clear and concise. We thank you for understanding!
50+ professional tools for Excel to do your daily work
50+ professional tools for Excel 2016-2007 to do your daily work
Incredible product, even better tech support…AbleBits totally delivers!
Deborah Bryant
Anyone who works with Excel is sure to find their work made easier
Jackie Lee
The best spent money on software I've ever spent!
Patrick Raugh
Ablebits is a fantastic product - easy to use and so efficient.
Debra Celmer
Excel is at its best now
Annie C.
I don't know how to thank you enough for your Excel add-ins
Jennifer Morningstar
Anybody who experiences it, is bound to love it!
Kumar Nepa
AbleBits suite has really helped me when I was in a crunch!
Nelda Fink
I have enjoyed every bit of it and time am using it
Christian Onyekachi Nwosu
It's the best $100 we've ever spent!
Mike Cavanagh
I love the program, and I can't imagine using Excel without it!
Robert Madsen
One word… WOW!
Dave Brown
Love the products!
David Johnston
It is like having an expert at my shoulder helping me…
Linda Shakespeare
Your software really helps make my job easier
Jeannie C.
Thanks for a terrific product that is worth every single cent!
Dianne Young
I love your product
Brad Gibson
Sheila Blanchard