Hello, team!
I've got a time-consuming task I'm trying to streamline. I have a spreadsheet with four pivot tables on one sheet, each pulling different information about the same Merchant. I filter by the Merchant field.
This data comes from a large external database, and if I record a macro, it doesn't show the Merchant name, but a number (and this number has no meaning for me. I can't query the table it's coming from.)
I'd like to manually select the first Merchant, then have the other three pivot tables on the sheet be updated via the macro to select the same merchant for all of the other tables.
This is the code generated when I select a Merchant from the first table:
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 02]").VisibleItemsList = Array( _
"[Merchant].[Merchants].&[3680]")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 03]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 04]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 05]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 06]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 07]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 08]").VisibleItemsList = Array("")
I believe I need to capture that first item (which should be 3680 in the code above) and then insert it into the other four tables, but I'm not sure how to do that.
Any help would be most appreciated!
Thanks!
BT
I've got a time-consuming task I'm trying to streamline. I have a spreadsheet with four pivot tables on one sheet, each pulling different information about the same Merchant. I filter by the Merchant field.
This data comes from a large external database, and if I record a macro, it doesn't show the Merchant name, but a number (and this number has no meaning for me. I can't query the table it's coming from.)
I'd like to manually select the first Merchant, then have the other three pivot tables on the sheet be updated via the macro to select the same merchant for all of the other tables.
This is the code generated when I select a Merchant from the first table:
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 02]").VisibleItemsList = Array( _
"[Merchant].[Merchants].&[3680]")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 03]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 04]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 05]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 06]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 07]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable20").PivotFields( _
"[Merchant].[Merchants].[Level 08]").VisibleItemsList = Array("")
I believe I need to capture that first item (which should be 3680 in the code above) and then insert it into the other four tables, but I'm not sure how to do that.
Any help would be most appreciated!
Thanks!
BT