VBA select designated multiple items in pivot table field list (if visible)

AngieP

New Member
Joined
Jul 21, 2016
Messages
2
There is a "Status" field in my workbook that captures 20 different statuses based on phase in project. (Not all 20 items are actively used.)
In my pivots I only need to capture 15 of the 20 statuses.

Problem: I can't pre-select or auto-select the items I want because not all of them are active at all time and thus they don't show up in the pivot table field list items.

Ex. Phase 4 and Phase 5 statuses are used rarely,that is why every single time I have to manually update items under Status in the pivot field list to make sure it captures all the statuses i want.

I can't record macros for this, because if one status is not active, the macro will run into a bug trying to find that status.

Solution: I believe I need a VBA code to autoselect the pre-designated items under status if they are visible/active.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,136,735
Messages
5,677,462
Members
419,693
Latest member
divtjd

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
Top