G
Guest
Can someone help me with this?
I need a Pivot table to change data according to information in a particular
cell through VB.
For example: if cell M3 is 3500 I want the Pivot table to show the
information for 3500. My poor attempt below
ActiveSheet.PivotTables("PivotTable2").PivotFields("ID").CurrentPage =
"RANGE (M3)"
I can do it using IF's:
If ActiveCell = 3500 Then
ActiveSheet.PivotTables("PivotTable2").PivotFields("ID").CurrentPage =
"3500"
End if
But I would end up with an extremely long code, because there are up to 3500
combinations.
I need a Pivot table to change data according to information in a particular
cell through VB.
For example: if cell M3 is 3500 I want the Pivot table to show the
information for 3500. My poor attempt below
ActiveSheet.PivotTables("PivotTable2").PivotFields("ID").CurrentPage =
"RANGE (M3)"
I can do it using IF's:
If ActiveCell = 3500 Then
ActiveSheet.PivotTables("PivotTable2").PivotFields("ID").CurrentPage =
"3500"
End if
But I would end up with an extremely long code, because there are up to 3500
combinations.