I am trying to create a pivot table using a macro. The data being pivoted is dynamic and I will have different data to sort out from time to time. I will always have the same data that I want to select though just sometimes different data to deselect.
Attached is a sample workbook.
I may always want to display Code 1, Code 3, and Code 5 but never display anything else. When I create the macro and tell it to not display Code 2 if there is no Code 2 in the data it throws an error.
I read some other threads about using countif to solve this but was not able to figure out how to get that to work.
Can anyone help?
Thanks in advance!
Nate
Bookmarks