# Subtotal with multiple columns for "group by"?

#### Zel9088

##### New Member
I have a data table about a company having different divions. The divisions can order products to use them and they can order the same kind of things sometimes if they need them. I'd like to compare their orders from 2015 with the ones from 2016. So I need two levels of groups. The main should be divisions and under it should be product_names wich summarizes the amount of a certain product ordered in 2015 and then in 2016.

The data table is something like this:

 division product_name amount ordered_2015 amount_ordered_2016 A a 1 2 B b 10 5 C c 2 6 A d 0 3 C a 0 4 D b 0 9 A a 4 1 B c 5 2 B c 6 3

<tbody>
</tbody>

Is it possible to do what I want here in an easy way like subtotal? I'm only interested in a simple solution because I can summarize the data on my own in a difficult way using multiple functions, it's not what I'd like to do. I'd like to find a simpler way to do it.

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### Zel9088

##### New Member
I managed to group the summed data but still need a method to create a joined table to compare the data of the two years.

First I ordered the table by divisions and by product names. Then I did subtotal grouped by product names and summed the amount ordered. Then subtotal again but goup by division, sum the amount ordered again but this time without replacing the previous subtotal values.

Replies
1
Views
712
Replies
3
Views
762
Replies
7
Views
370
Replies
4
Views
169
Replies
1
Views
505

1,195,712
Messages
6,011,259
Members
441,598
Latest member
chrispaulpearce

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back