Vba working with slicers in Excel
Slicers are visual filters using which data can be filtered with a simple click.
Slicers can be used to filter data on Pivot table,Pivot chart or table.
Apart from filtering, slicers also display the current state of the filter, which is useful in understanding the data displayed.
The Slicers are available from Excel 2010 and above.
Create a Slicer
Let us take the following pivot table for illustration.
The following steps demonstrates the creation of a slicer
1.Click inside the pivot table.
2.Goto Analyze Tab.
Note that, the Analyze tab will be visible only if the pivot table is selected.
3. Select "Insert Slicer".
The following dialog box appears showing all the columns, which can be filtered of our choice.
In this example, let us choose Men,Population and Age<30 columns and apply filter.
Once done, the following slicers will be displayed.
Now, clicking on any button within each slicer, will filter the data of the pivot table accordingly.
selecting these rows gives you this