Paul_Hossler
05-03-2017, 05:39 PM
It seems that pivot tables use structured referencing like Tables do
The recorder generated this and it works to select a specific subtotal row, or all subtotal rows.
I can figure out most of it, but I can't find any explanation of the ";Sum" part in the information about structured references; what is and how to use it, other than it apparently finds the rows with 'sum' in the VENDOR field
Is that how it works?
Worksheets("Test1").PivotTables("TestPT1").PivotSelect "VENDOR[ACME PRODUCTS INC;sum]", xlDataAndLabel, True
Worksheets("Test1").PivotTables("TestPT1").PivotSelect "VENDOR[all;sum]", xlDataAndLabel, True
The recorder generated this and it works to select a specific subtotal row, or all subtotal rows.
I can figure out most of it, but I can't find any explanation of the ";Sum" part in the information about structured references; what is and how to use it, other than it apparently finds the rows with 'sum' in the VENDOR field
Is that how it works?
Worksheets("Test1").PivotTables("TestPT1").PivotSelect "VENDOR[ACME PRODUCTS INC;sum]", xlDataAndLabel, True
Worksheets("Test1").PivotTables("TestPT1").PivotSelect "VENDOR[all;sum]", xlDataAndLabel, True