Pivot tables and using combox box selections as a report filter

rlodge5

New Member
Joined
Dec 4, 2014
Messages
15
Hi, I need to use a combo box value in a report filter for a series of pivot tables.
I have a combo box with a drop down list of suppliers on the dashboard front sheet and want to be able to select one of the values and then update all the pivot tables/charts with the report filter using that value selected.

Any ideas gratefully received!
Thanks
Richard
 
how do I assign it to the combo box ? put in one of the controls? or run a small macro on its own
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Thanks - unfortunately when I right click, there isn't an option to choose 'Assign Macro'.
I get:
Cut
Copy
Paste
-----
Properties
View code
-----
Combo box object>
-----
Grouping
Order
-----
Format control
Have macros been disabled or something?
 
Upvote 0
That means it's an ActiveX ComboBox (not Form). If you choose View Code you will get a procedure stub. Copy it and paste it into a reply here.
 
Upvote 0
Try:

Code:
Private Sub ComboBox1_Change()
    Worksheets("val pivot").PivotTables(1).PivotFields("Supplier").CurrentPage = ComboBox1.Value
End Sub
 
Upvote 0
Can you record a macro while setting the current page on that pivot table and post the VBA code please? I did test the code before posting it.
 
Upvote 0
Hi, Sorry Andrew, for my ignorance again on macros - what do you mean by 'setting the current page on the pivot'???
 
Upvote 0

Forum statistics

Threads
1,216,136
Messages
6,129,080
Members
449,485
Latest member
greggy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top