orc_RadRad
New Member
- Joined
- Oct 8, 2021
- Messages
- 1
- Office Version
- 2019
- Platform
- Windows
Hi guys,
I'm trying to make the below code work, but unsucessfully so far.
On the side I'm having dynamic table (table6[MG]) and then i'm having a set of pivot tables. What i wanna do is if PT is named "a" then filter that table by "a" and proceed with next PT in the list
Kind regards
I'm trying to make the below code work, but unsucessfully so far.
On the side I'm having dynamic table (table6[MG]) and then i'm having a set of pivot tables. What i wanna do is if PT is named "a" then filter that table by "a" and proceed with next PT in the list
VBA Code:
Dim cell As Range
Dim rng As Range
Set rng = Range("Table6[MG]")
For Each cell In rng
ActiveSheet.PivotTables("" & cell & "").PivotFields( _
"[GameData].[MultiGame].[MultiGame]").VisibleItemsList = Array( _
"[GameData].[MultiGame].&[" & cell & "]")
Next cell
Kind regards