Dynamic Sorting of Pivot Table Values

gmooney

Board Regular
Joined
Oct 21, 2004
Messages
242
Office Version
  1. 365
Platform
  1. Windows
Hi, I have a pivot table with rows that are equal to Products (actually UPCs) and then column are various customers across the country AND a Total US customer.

My value is U/S/W.

Right now the pivot table is set up to sort the UPC rows descending on U/S/W based on the Total US customer. I would like to be able to introduce the ability for the user to change the sort to whatever customer they want that is already displayed in the pivot table. I DO NOT want them to have to manually go change the sort each time by right clicking on the row label and more options to change to another column.

Can something be done in VBA or maybe even sort buttons added just above the Customer column names that will automatically do this?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

GraH

Well-known Member
Joined
Mar 22, 2020
Messages
1,020
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Do the users still need to see the other customers or not?
Then a simple slicer on the customer name will work. Since it will filter on rows the customer, and sort on the total which will only be the selected customer total.
 

Forum statistics

Threads
1,147,474
Messages
5,741,341
Members
423,655
Latest member
pepo1985

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
Top