Tips and Help on Excel and VBA for Excel


Excel Chapter 4B of 24: Excel Database Subtotals

NOTE: If Excel recognizes your set of data as a database you can sort the data

In Excel there is a SUBTOTAL function and  there is also a subtotal functionality. Here is the functionality.

IMPORTANT NOTE: When you want to see the subtotals by clients you must first sort the database by clients.

Click anywhere in the database and go to the menu " Data/Subtotals..." and this window appears.

  Excel database subtotal

In the first text box a list of the names of your fields appear (the words in the title cells of each of you columns). Select the field (column) for which you want a subtotal (by client, by product, by date or other). In the second text box select the kind of subtotal that you want (sum, count, average or other). In the list box, add a check for all the fields that you want subtotaled. Click on " OK" .

Once you have activated the functionality Excel calculates the subtotals (be patient if you have thousands of records (rows)) and at the end of the process you see your records, the subtotals and the grand total. On  the left of the spreadsheet you will see this:

Excel outline marker

If you click on "1" you see only the grand total, on "2" you see the grand total and the subtotals and on "3" you see everything.

To deactivate the subtotals functionality click within the database, go to the menu "Data/Subtotals.." and select


Next Chapter: Pivot Tables in Excel


Discover more in 50 Excel spreadsheets


    Tips and Help on Excel and VBA for Excel

Excel Database Subtotals