excel 2010You can group rows or columns manually using the "Group" feature. That will tie a range of cells together so they can be collapsed or expanded. First you need to prepare your data, remove blanks, sort the data and insert subtotals manually.

Inserting subtotals manually and grouping rows are time consuming tasks but they can be done automatically if you use "Subtotal" feature instead. Here is how.

Example data.

subtotals

Sort data

  1. Select A1:C17
  2. Right click on your selection
  3. Click "Sort"
  4. Click "Custom Sort..."
    custom sort
  5. Sort by "Salesperson"
  6. Add a Level
  7. Then by "Region"
  8. Click OK

subtotals1

Insert Subtotals

Remember that you can´t insert subtotals if you are working with an excel table. You must convert the table to a normal range.

  1. Select cell range A1:C17
  2. Go to tab "Data" on the ribbon
  3. Click "Subtotal" button
    subtotals2
  4. Click "OK"

This picture shows subtotals, a grand total and symbols so you can quickly collapse/expand rows.

subtotals3

Click subtotal-symbol symbol to collapse rows and click subtotal+symbol symbol to expand rows.

You can also expand or collapse all rows on a hierarchy level by pressing 1, 2 or 3:  subtotal expand collapse

subtotals1

Subtotals on multiple levels

You can add more subtotals to your data list. We inserted subtotals before when a change occurred in column Salesperson, let's add a new subtotal for each change in column Region.

  1. Select cell range A1:C20
  2. Click "Subtotal" button on tab "Data"
    subtotals on multiple levels
  3. Click the drop down menu below the "At each change in:"
  4. Select Region
  5. Clear checkbox "Replace current subtotals"
  6. Click OK

subtotals on multiple levels1

Add data bars

Now it is time to spice up your data table with some chart bars. Hold on, I am not going to insert a chart. Conditional Formatting can provide the magic for this occasion.

  1. Create a new column and type =C2 in cell D2.
  2. Copy cell D2 to the cells below
  3. Remove cells that link to subtotals and grand total
  4. Select cell range D2:D24
  5. Go to tab "Home" on the ribbon
  6. Click "Conditional formatting" button
  7. Click "Data Bars"
  8. Click "More Rules..."
    New formatting rule - Data Bars - Conditional formatting
  9. Enable checkbox "Show Bar Only"
  10. I chose a "Solid Border" from the "Border" drop down menu.
  11. Click OK

subtotals on multiple levels and data bars

Remove all subtotals

You can easily remove all subtotals, select the cell range you want to remove subtotals from. Go to tab "Data", click "Subtotal" button.

remove subtotals

Click "Remove All" button.

Build a pivottable/pivotchart

A pivot table allows you to summarize a data table in many different ways, using different criteria. It is easy and you will be analyzing your data in no time. Pivottables are subtotals on steroids.

I highly recommend reading this blog post: Analyze trends using pivot tables, there is also a quick introduction to pivot tables.

You can also compare data, year to year, month to month and whatever time frame you like.

Download excel *.xlsx file

Subtotals on multiple levels.xlsx