Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88854

Excel Dropdown to Filter Pivot Tables on Separate Sheet

$
0
0

I've created a drop down using Form Control Combo Box for the user to select/filter the data without having to go to the pivot table itself. How can I connect the Form Control Combo Box through VBA to a pivot table in another sheet so the value selected from the drop down is the filter to be used in the pivot table in the separate worksheet?

I've tried the code below but the pivot table still doesn't catch the text in the drop down. The filter in the pivot table still does not change when I select a different item from the drop down.

Sub Macro34()

 Dim valmonth As String
 valmonth = Range("D3").Value

Sheets("Pivot_Main").PivotTables("PivotTable6").PivotFields("Month").CurrentPage = _
        valmonth

End Sub

Viewing all articles
Browse latest Browse all 88854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>