Hi All
I was wondering whether someone can give me a quick example of how to write a code to do the following:

I have a slicer Called Slicer_Division and the items in the slicers are =name of the divisions. my worksheet is called Results and my powerpivot table is called Results

What I want to do is to assign a variable to the value of the item selected in the slicer, for example if one chooses AAA from the slicer the variable takes the value of AAA. I need to use this variable in If statement so that it call the right procedure depending on the value of the slicer.

Is there a easy code and Dim declaration to do this

Thanks in advance