Excel group pivot table percentages (VBA)

witchcraftz

New Member
Joined
Jan 17, 2008
Messages
39
My pivot table data is a simple list of percentages, it is similar to the list below:

0%
10.01%
8%
100%
80%
20.2%
100%
90%
50%
6.6%
48%

I want to group the data this way:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Percentage[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]100%[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]75% to <100%[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]50% to <75%[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]25% to <50%[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]0%> to <25%[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]0%[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]


I have read a some posts but I'm not sure how to do this.

The closest is this post but the grouping is wrong and my mind is having a hard time figuring out how to modify this for my purposes.

https://stackoverflow.com/questions/46912874/pivot-table-grouping-percentage-ranges-using-vba
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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