Hi All
Hoping someone can help.
I'm having trouble with the following piece of code. It opens the pivot details of PivotTable1 on a new sheet
PivotTable1 is the larger table underneath
Pivots.png
It's been working perfectly, that was until I added a second pivot on each sheet :/
Now when I run the code sometimes it selects the total of PivotTable1 other times PivotTable2 before advancing to Selection.ShowDetail
At first the selection seemed random but I've tested it a few times and always get exactly the same results
To test, run the Sub BuildPivotRows().
Add a breakpoint here, to see which cell/pivot table total is selected
Breakpoint.png
Results for each of the 10 SLA sheets:
SLA1: Selects PivotTable1 total
SLA2: Selects PivotTable2 total
SLA3: Selects PivotTable2 total
SLA4: Selects PivotTable1 total
SLA5: Selects PivotTable2 total
SLA6: Selects PivotTable1 total
SLA7: Selects PivotTable2 total
SLA8: Selects PivotTable1 total
SLA9: Selects PivotTable2 total
SLA10: Selects PivotTable1 total
So 'show pivot detail' is correct for SLAs 1, 4, 6, 8, 10
But gets the wrong table on SLAs 2, 3, 5, 7, 9
Always. I can't explain it.
Any help/advice on how I can get this sub to always select / show details for PivotTable1 would mean the world
Many thanks in advance
Vicky
Bookmarks