Solved

Get Value from Slicers in Excel 2010

Posted on 2014-03-20
2
6,376 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

739 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