I have two workbooks, each containing a pivot table. The two pivot tables contain the same fields, but the values are different. What I'm trying to do is use VBA to add Fields to "Rows", one at a time. So let's say the pivot tables have 5 fields: Dollars, Account, Activity, Category, Category 2. I would manually put Dollars in "Values" and Account in "Columns" and I'm not looking to automate this part. Starting with the 3rd field, Activity, I want to bring it in the "Rows" using VBA. When I'm done with that field, I want to use VBA to bring the next one in the list which would be Category. Preferably this code would skip over fields that are already brought in the report, so it would skip over Dollars and Account if they were sorted after Category, for example. The vba would do it for the two pivot tables. The goal of this is to facilitate reconciling the values of two pivot tables in two separate workbooks. If it's easier, I could put the pivot tables in the same workbook, in different sheets. I'm looking forward to hearing your suggestions.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Workbook Name[/TD]
[TD]Sheet Name[/TD]
[TD]PivotTable Name[/TD]
[/TR]
[TR]
[TD]Production[/TD]
[TD]Sheet1[/TD]
[TD]PivotTable1[/TD]
[/TR]
[TR]
[TD]Testing[/TD]
[TD]Sheet1[/TD]
[TD]PivotTable1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]Workbook Name[/TD]
[TD]Sheet Name[/TD]
[TD]PivotTable Name[/TD]
[/TR]
[TR]
[TD]Production[/TD]
[TD]Sheet1[/TD]
[TD]PivotTable1[/TD]
[/TR]
[TR]
[TD]Testing[/TD]
[TD]Sheet1[/TD]
[TD]PivotTable1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]