• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Drop-Down List Controls Multiple Slicer Connections

The only way I've been able to find is with using an ActiveX dropdown, and then using VB to change the slicer based on your dropdown choice. :-/
 
Luke,

Any suggestions on how to apply the ActiveX dropdown with VB to change the slicers on this SkyDrive file:
http://sdrv.ms/1d6rXcx

For example, I want the dropdown in cell F4 on sheet 'Dash-1' to change the filters on both of the "Specialty" slicers located on sheet 'Dash-1'. For some specialties, there may be multiple selections. The dummy columns on sheet 'SummaryChart' correspond to the Specialty column on the 'SummaryChart'. The Specialty column on the 'SummaryChart' feeds the dropdown in cell F4 on sheet 'Dash-1'.

Any help is greatly appreciated!
 
I have updated the workbook to include the code below in sheet 'Dash-2'. I incorrectly referenced 'Dash-1' in my previous post, as I should have referenced 'Dash-2'.

Here is the file: https://skydrive.live.com/redir?res...71&authkey=!AFWhluxXyHm_hvo&ithint=file,.xlsm

This is a start; however, does not fully accomplish what I am attempting to do and seems inefficient:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim SI As SlicerItem
Application.EnableEvents = False
If Not Intersect(Target, Range("F4")) Is Nothing Then
With ActiveWorkbook.SlicerCaches("Slicer_Specialty1")
.ClearManualFilter
For Each SI In .SlicerItems
SI.Selected = UCase(SI.Value) = UCase(Range("F4").Value)
Next SI
End With
End If
ExitSub:
Application.EnableEvents = True
End Sub

If I change the bold/red line to include another slicer entered as such below, the code fails entirely.
With ActiveWorkbook.SlicerCaches("Slicer_Specialty1", "Slicer_Specialty")

This code is also limited in that it only references the dropdown selection. I need it to reference the selection there, and based on the table on 'SummaryChart' match the information (table name: SummaryChart) to make slicer selections.

I have been referencing the following links:

Slicer VBA Code – Create, Change or Modify a Pivot Table Slicer using VBA-
http://www.databison.com/slicer-vba-code-create-change-or-modify-a-pivot-table-slicer-using-vba/

Change Slicer Selection based on Cell Input-
http://www.ozgrid.com/forum/showthread.php?t=166949

VBA for filtering a slicer with a cell condition-
http://www.excelforum.com/excel-pro...filtering-a-slicer-with-a-cell-condition.html


Any help is GREATLY appreciated!
 
Back
Top