W
W
WebAnalytics12018-04-16 15:17:57
excel
WebAnalytics1, 2018-04-16 15:17:57

How to set automatic date update in excel pivot table?

How to write a script to update dates(taken from cells `H2` `I2` `J2` ) in a PivotTable in excel 2016
Using a macro entry got this
ActiveSheet.PivotTables("PivotTable13").PivotFields( _
"[Date Reporting]. [Calendar YMD].[Year]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable13").PivotFields( _
"[Date Reporting].[Calendar YMD].[Month Year]").VisibleItemsList = Array("")
ActiveSheet.PivotTables("PivotTable13").PivotFields( _
"[Date Reporting].[Calendar YMD].[DT]").VisibleItemsList = Array("", "", _
"[Date Reporting] .[Calendar YMD].[DT].&[ThisWorkbook.Sheets(Statistics).Cells(2, 8).Value]", _
"[Date Reporting].[Calendar YMD].[DT].&[2018-04-02T00:00:00]", _
"[Date Reporting].[Calendar YMD].[DT].&[2018-04 -09T00:00:00]")
The data in the cells is formed by the formula `TEXT(TODAY()-2;"YYYY-MM-DDThh:mm:ss")`

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WebAnalytics1, 2018-04-16
@WebAnalytics1

found "[Date Reporting].[Calendar YMD].[DT].&[" & ThisWorkbook.Sheets("Statistics").Cells(2, 8.Value & "]", _

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question