Solved

Get Value from Slicers in Excel 2010

Posted on 2014-03-20
2
6,222 Views
Last Modified: 2014-04-11
How can I refer to the value (filter) of a slicer in Excel?

Example: My slicers is used as a filter for different departments. When I select one department, the pivot data changes accordingly, and I want the name (slicer value) of this department to be displayed in one on the cells at the top of the worksheet.

Range("A1").Value = <your answer here>

Any clues?
0
Comment
Question by:PerMagnusStrom
2 Comments
 
LVL 50

Expert Comment

by:Rgonzo1971
ID: 39944570
Hi,

The syntax is like this

ActiveWorkbook.SlicerCaches("Slicer_ContactType").SlicerItems("Client").Selected = True

Open in new window

Regards
0
 
LVL 11

Accepted Solution

by:
jkpieterse earned 500 total points
ID: 39944840
If the slicer is connected to a powerpivot pivottable you can use the CUBERANKEDMEMEBER function to get a list of selected sliceritems.
Other wise a VBA UDF is required.

Look at this page for some info on slicers and VBA:
http://www.jkp-ads.com/articles/slicers00.asp
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question