PivotTable grouping value

davidcoder

New Member
Joined
Oct 8, 2013
Messages
1
Hi, I'm trying to group value for category column, I have a source data like below :

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Category[/TD]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Item[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]Cat A[/TD]
[TD]2[/TD]
[TD]AA[/TD]
[TD]Item 1[/TD]
[TD]$2[/TD]
[/TR]
[TR]
[TD]Cat A[/TD]
[TD]2[/TD]
[TD]AA[/TD]
[TD]Item 2[/TD]
[TD]$3[/TD]
[/TR]
[TR]
[TD]Cat B[/TD]
[TD]3[/TD]
[TD]BB[/TD]
[TD]Item 3[/TD]
[TD]$4[/TD]
[/TR]
[TR]
[TD]Cat B[/TD]
[TD]3[/TD]
[TD]BB[/TD]
[TD]Item 4[/TD]
[TD]$5[/TD]
[/TR]
</tbody>[/TABLE]

Below is how I want to present my data in pivottable:


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]+ Cat A[/TD]
[TD]2[/TD]
[TD]AA[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
Item 1​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]$2[/TD]
[/TR]
[TR]
[TD]
Item 2​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]$3[/TD]
[/TR]
[TR]
[TD]+ Cat B[/TD]
[TD]3[/TD]
[TD]BB[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
Item 3​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]$4[/TD]
[/TR]
[TR]
[TD]
Item 4​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]$5[/TD]
[/TR]
</tbody>[/TABLE]


Can this be done in pivottable ? Thanks for your help.
 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I don't want to say definatively that it cannot, but just by looking at it, within a single table, no.

The closest you could get within one table without formatting multiple tables to look like one, I think, is:
[TABLE="class: grid, width: 500"]
<TBODY>[TR]
[TD]Row Label [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: center"]Sum of Price[/TD]
[/TR]
[TR]
[TD]+Cat A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]Item 1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]AA[/TD]
[TD="align: center"]$2[/TD]
[/TR]
[TR]
[TD="align: right"]Item 2[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]AA[/TD]
[TD="align: center"]$3[/TD]
[/TR]
[TR]
[TD]+Cat B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]Item 3[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]BB[/TD]
[TD="align: center"]$4[/TD]
[/TR]
[TR]
[TD="align: right"]Item 4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]BB[/TD]
[TD="align: center"]$5[/TD]
[/TR]
</TBODY>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,643
Members
452,663
Latest member
MEMEH

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top