I wrote a macro that will highlight specific numbers in cells of a PivotTable if certain conditions are met. What I would like to do is create a macro that runs when a checkbox on the spreadsheet is selected. I know how to set that up, I'm just not familar with declaring variables that will relate them to PivotTable Items. Basically I have a series of values for Q1, Q2, Q3, and Q4 in my data field. The row field goes by project name. How do I write a macro that tells excel to no longer make those row and data fields visible if they aren't highlighted? For the data fields I realize that I'll have to tell excel to remove that particular item (e.g. Q2) from the data field list.
For example, if all values in Q1 are not highlighted, then make the data field Q1 invisible. Same goes with the row fields. Thanks in advance!
Bookmarks