Use VBA to filter user selected pivot table field using user selected list

mbrowning

New Member
Joined
Oct 29, 2013
Messages
11
Hi all,
I've done a lot of searching and have tried to piece something together, with no luck, based on other responses. I know there are a lot of threads on the subject of filtering a pivot table with VBA, but my biggest challenge is that most macros are referencing a specific pivot table, a specific field, and/or a specific range where a list is stored.

Ideally, what I'd like to do is:
Start macro and
1) Have user select a field in a pivot table that is to be filtered, and then
2) Have user select a range where a list is stored

I can't quite mesh everything together where it can be any user selectable field in a pivot table based off a list that can be in any location and of any varying length. I'm hoping this isn't an impossible dream!

Thanks!!

Oh, and I'm using Excel 2010.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
It was so bad that I trashed the module unfortunately. I had some time to kill so I decided to take another stab at it, and I actually found 99% of what I was looking for, using a macro and using a plug in.

The macro I found is from Daily Dose of Excel » Blog Archive » Filtering Pivots based on external ranges. found under the 'faster approach' section.
It actually does exactly what I was asking for. That 1% I can't seem to figure out, though, is how to let it let me select a range found on another workbook. But that's trivial for now, because I can just put my list on the current workbook.

So that worked great for a regular pivot table. Then I tried it on an olap cube. Silly me, of course it's not going to work on an olap cube! Thankfully some wonderful person developed an olap pivot table add in that does the trick! OLAP PivotTable Extensions - Home

It's almost kind of sad how happy I am to find that add on :ROFLMAO:
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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