Limiting Slicer multiple selection

Paul-NYS

New Member
Joined
Feb 6, 2012
Messages
23
Hi
I have a pivot table that is linked to charts and has several slicers. Is there any way to limit the number of items a person can select in a slicer to just one? If you hold down the control key, you can select more than one slicer option, which messes up the chart numbers (to put it in non-sophisticated terms).

Paul
 
Hi, did the question in post #14 ever get answered? I have the same issue; I can get the code to work for a single slicer but I have several slicers that need to be limited. I tried copying and pasting the code directly underneath the first piece of code (and changing the slicer name) but I get the following error:

Compile error:

Ambiguous name detected: Workbook_SheetPivotTableUpdate

Please help!
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi bitechie,

Here is some code for you to try. Paste the code into the ThisWorkbook Code Module of your Workbook....


Hi Jerry,

I have two slicers from the same pivot table that i would like limit to a single selection, how would i update the code in order to include a second slicer?

Thanks,

Abdulla
 
Last edited by a moderator:
Upvote 0
I know this is old thread, but I haven't been able to find any other solutions on the internet. I'm getting an "Application-defined or object-defined" error in
Code:
If slc.VisibleSlicerItems.Count > 1 Then
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,138
Members
449,098
Latest member
Doanvanhieu

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