ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing pivot table views with a macro (https://www.excelbanter.com/excel-programming/324841-changing-pivot-table-views-macro.html)

Roberto Hernandez

Changing pivot table views with a macro
 
I want to create a macro that lets you change the arrangement of a pivot
table in Excel 2003 with OLAP Data.

I turn on the macro recorder and make the changes to the pivot table
manually then I see the results but is very complicated and do not work at
all. Is there a simple way to add one item and remove another item? Or to do
a do while cycle or for each cycle of all items and then select the items
that I'm interested to show.



Those are very complicated:

Hoja.PivotTables("PivotTable").CubeFields(3).Treev iewControl.Drilled

Hoja.PivotTables("PivotTable").PivotFields("[Fecha].[Year]").HiddenItemsList

The thing I need to do is to show the past 12 months of a date dimension for
a given date.




All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com