How To Get Pivot Filter Value

stevenjobs

New Member
Joined
May 31, 2017
Messages
6
Hi,

My macro displays an image of a product next to the the product's name on the pivot table. It does this by going into an directory where all the products' images are stored. This, however, takes a lengthy amount of time given the number of products. So, I split the directory into many subfolders. Each subfolder is named after what kind of product it is (apparel, personal care, accessory, etc). There is a filter on the pivot table that filters all of these products into these sub categories as well.

Is there a way for me to get the String value of the filter option being used so that I can use this string to know what directory to search in? For example, if the filter on the pivot table is switched to "Apparel," what code would give me that String so I know to search for the image in the "Apparel" subfolder I have created. I've struggled with .PivotField and the items properties for a long time now.

Any help would be much appreciated
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,215,366
Messages
6,124,514
Members
449,168
Latest member
CheerfulWalker

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