sachin20us
New Member
- Joined
- May 30, 2017
- Messages
- 6
All,
Hope all is well.
Cell A2 in Data 06/09/2017 has the date 06/09/2017. This date updates according to the current date or on adhoc basis.
Tab Data 06/09/2017 has the data in a table.
Tab Trend 06/09/2017 has a pivot table that updated according to the data 06/09/2017
Tomorrow i have to create two tabs with Data 06/10/2017 and Trend 06/10/2017 as sheet names. The dates are based on date value in cell A2
I have the macro below that dynamically updates my existing pivot table automatically based on the input i give. How to i make the below macro so that instead of pivottables sheet name the macro selects and automatically updates the Trend 06/09/2017 worksheet.
Data tab has the worksheet named data
Pivot table is in the pivottables sheet
In the data tab. i Click on view code and change the macro to Selectionchange....
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sheets("Pivot table").PivotTables("PivotTable1").RefreshTable
End Sub
Hope all is well.
Cell A2 in Data 06/09/2017 has the date 06/09/2017. This date updates according to the current date or on adhoc basis.
Tab Data 06/09/2017 has the data in a table.
Tab Trend 06/09/2017 has a pivot table that updated according to the data 06/09/2017
Tomorrow i have to create two tabs with Data 06/10/2017 and Trend 06/10/2017 as sheet names. The dates are based on date value in cell A2
I have the macro below that dynamically updates my existing pivot table automatically based on the input i give. How to i make the below macro so that instead of pivottables sheet name the macro selects and automatically updates the Trend 06/09/2017 worksheet.
Data tab has the worksheet named data
Pivot table is in the pivottables sheet
In the data tab. i Click on view code and change the macro to Selectionchange....
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sheets("Pivot table").PivotTables("PivotTable1").RefreshTable
End Sub