I can create a Pivot Table for the data I download and it works fine. However, when I made a Macro to do the same thing, I get an error. The error is: Run-time error '5': The following is a scre...
I have a similar issue noting that I'm trying create 1 pivot table (template) with the same edits in font size, filter, and column width edits, and column title change), so the macro will duplicate the table 6 times into 6 new sheets. Then I'd like to rearrange the categories in the Table Row within PivotTable Fields to look differently at the table data in each sheet..
VBA runs, creates the 1st pivot, but on the copy/paste to a new sheet step, it seems to drop the very 1st row category inside the PivotTable Fields section (noting it was there when macro was created and is within the VBA script-hence the error)
"code scan" is not even generated under the first Table created from the macro.
***Even the 1st PV created (3rd image) doesn't contain the 1st row category (Code Scanned Y/N) noted in the macro VBA code for position 1 (1st image)
*** the missing category propagates upon creating the next copied table noting it could not find position 2 category name.
Does something happen when you rearrange the categorical values in the Rows box of PivotTable Fields? Even though they are 6 independent tables since they were copied/pasted?