Author: Oscar Cronquist Article last updated on December 21, 2017

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

Sort data

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

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
4. Click "OK"

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

ClickÂ Â symbol to collapse rows and clickÂ Â symbol to expand rows.

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

### 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"
3. Click the drop down menu below the "At each change in:"
4. Select Region
5. Clear checkbox "Replace current subtotals"
6. Click OK

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..."
9. Enable checkbox "Show Bar Only"
10. I chose a "Solid Border" from the "Border" drop down menu.
11. Click OK

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

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.