cogswel__cogs
Board Regular
- Joined
- Jan 3, 2018
- Messages
- 181
Hi,
I have a a pivot field in the filter area that I would like to loop through.
The below works when I am in row but in filter area it does not.
Would someone know what I need to change.
For i = 1 To ActiveSheet.PivotTables("PivotTable1").PivotFields("Department Rollup Level 7 (Division)").PivotItems.Count
If ActiveSheet.PivotTables("PivotTable1").PivotFields("Department Rollup Level 7 (Division)").PivotItems(i).Visible = True Then
cc(j) = ActiveSheet.PivotTables("PivotTable1").PivotFields("Department Rollup Level 7 (Division)").PivotItems(i).Value
j = j + 1
End If
I have a a pivot field in the filter area that I would like to loop through.
The below works when I am in row but in filter area it does not.
Would someone know what I need to change.
For i = 1 To ActiveSheet.PivotTables("PivotTable1").PivotFields("Department Rollup Level 7 (Division)").PivotItems.Count
If ActiveSheet.PivotTables("PivotTable1").PivotFields("Department Rollup Level 7 (Division)").PivotItems(i).Visible = True Then
cc(j) = ActiveSheet.PivotTables("PivotTable1").PivotFields("Department Rollup Level 7 (Division)").PivotItems(i).Value
j = j + 1
End If