How to display subtotals for a main and sub category of a PivotTable?

时间:2015-06-26 09:53:22

标签: excel excel-vba pivot-table vba

I have the following data:

enter image description here

I want to calculate the occurrence of each color for a given shape.

Using PivotTables, I got this:

enter image description here

However, this is the output I want:

enter image description here

How do I achieve this in Excel? Is this possible using a PivotTable?

Thanks!

1 个答案:

答案 0 :(得分:0)

Solution: Yes, it is.

(1) Structure your selected fields like this:

enter image description here

(2) Right click "Shape" in Row Labels and in the "Layout & Print" tab, select "Show item labels in tabular form".

enter image description here

Result:

enter image description here