How to access selected report filter values in Excel Pivot table from VBA code or Formulas?

prokurors

New Member
Joined
Feb 13, 2014
Messages
3
I have a pivot table with report filter field. I need to do some operations based on the value user selects in report filter field.
If user selects single value (or selects <code style="margin: 0px; padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);">All</code>) - no problem to get that value. In sample video it's cell B1, but in case of multiple values are selected, this field shows just <code style="margin: 0px; padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);">Multiple selected</code>.
Where can I get the specific reporting filter values that are selected? Can I access those values from Excel formulas? If not - can I access those values from VBA code?

Sample video
2015-04-08_1119 - Prokurors's library

PURPOSE
I want to access those values that were selected in report filter field. And do some calculation that would get values from rows (from another table) that has only values that are selected in report filter field (currently this is working when I have selected "All" or one of values, but can not get this working with multiple values selected)

 

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.
I want to access those values that were selected in report filter field. And do some calculation that would get values from rows (from another table) that has only values that are selected in report filter field (currently this is working when I have selected "All" or one of values, but can not get this working with multiple values selected)

[/FONT][/QUOTE]

So the easiest way to get the values to display is to right click in the table, select display options, select the display tab, and check the Classic pivot table design. this will allow drag and drop in the table, but the view will let you display the current filter settings.
 
Upvote 0
So the easiest way to get the values to display is to right click in the table, select display options, select the display tab, and check the Classic pivot table design. this will allow drag and drop in the table, but the view will let you display the current filter settings.


Hmm... I don't get how this suggestion is related to my question :(

But, I've got answer for this question on msdn forum, You can find the answer here:
https://social.msdn.microsoft.com/F...exceldev#cd8cbaad-434f-455c-a712-dc6c2d9905ed
 
Upvote 0

Forum statistics

Threads
1,217,382
Messages
6,136,234
Members
450,000
Latest member
jgp19

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