This is a discussion on change slicer seletion based on cell value within the Excel Questions forums, part of the Question Forums category; Hi guys, Idk if this is even possible. Is there a way to programatically change the slicer selection based on ...
Idk if this is even possible.
Is there a way to programatically change the slicer selection based on cell value.
Lets say, if the Cell A1 = 1, select A, B and C in slicer. if 2 then D,E and F and so on.
I have 12 conditions (1 to 12) in the drop down box.
Thanks in advance.
Yes, that can be done.
You can get a good framework for that by using the macro recorder to record your manual steps.
If you'd like some help with that please..
1. Provide the name of the Slicer
2. Clarify the mapping between the value in A1 and the Slicer Items to be Selected. (you provided an example, but you'll run out of letters before getting to A1=12). Can you provide an example that is more like your actual case? If there isn't a clear pattern like your example, you'll need to store the mapping somewhere (perhaps in the VBA code itself, or in a lookup table in your workbook).
Using Excel 2013