Hi,
Just experimenting...
2 Questions
1. I have event code to collect the slicer value and put it in a cell. The Ship Via value is working great, but is there a way you have the code provide ONLY the subset of dates for the Ship Via filter?
2. I see that the slicer is available as a named range. Is there any way I can used that named range in a formula?
See the attached for details.
TIA
Getting Slicer Values
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Getting Slicer Values
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Administrator
- Posts: 78412
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Getting Slicer Values
1. Try this:
2. No. If you use Jan Karel Pieterse's indispensable Name Manager add-in, you'll see that the slicer names refer to the formula ="", so you can't do anything useful with them.
Code: Select all
For Each sItem In cache.SlicerItems
i = i + 1
If sItem.Selected = True And sItem.HasData Then
Worksheets("Sheet2").Range("I11").Offset(i).Value = CDate(sItem.Value)
End If
Next sItem
Best wishes,
Hans
Hans
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Getting Slicer Values
The code works great now.
Thanks for that, and clarity on Q#2
Thanks for that, and clarity on Q#2
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.