nicko
07-31-2008, 04:15 AM
Hi all,
I have a series of pivot tables and charts and I have the following macro to automatically refresh whenever the data changes...
Sub recalculate()
Sheets("7").Select
ActiveSheet.PivotTables("PivotTable1").RefreshTable
Sheets("9").Select
ActiveSheet.PivotTables("PivotTable2").RefreshTable
Sheets("11").Select
Dim pt As PivotTable
For Each pt In ActiveSheet.PivotTables
pt.RefreshTable
Next pt
End Sub
Is there a way to add to this so the chart columns/bars will automatically scale from highest to smallest? i.e pareto the chart so I dont have to do sort manually each time in the pivot tables
Any ideas?
Many thanks,
Nicko
I have a series of pivot tables and charts and I have the following macro to automatically refresh whenever the data changes...
Sub recalculate()
Sheets("7").Select
ActiveSheet.PivotTables("PivotTable1").RefreshTable
Sheets("9").Select
ActiveSheet.PivotTables("PivotTable2").RefreshTable
Sheets("11").Select
Dim pt As PivotTable
For Each pt In ActiveSheet.PivotTables
pt.RefreshTable
Next pt
End Sub
Is there a way to add to this so the chart columns/bars will automatically scale from highest to smallest? i.e pareto the chart so I dont have to do sort manually each time in the pivot tables
Any ideas?
Many thanks,
Nicko