Solved

Get Value from Slicers in Excel 2010

Posted on 2014-03-20
2
5,744 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 48

Expert Comment

by:Rgonzo1971
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

744 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now