I need help with an huge amount of data that keep beeing refreshed. I need to develop a button that brings me the top 5 names that have the most sum amount of revenue and the sum of the amount of revenue of each name. thanks
If there's no need to get cute:
1) put your data in a dynamic named range
2) create 2 pivot tables with the desired sort on and set filter to top X
3) Using getpivotdata() set up grids on your output sheet
4) simple....super simple....vba to refresh the pivot tables based on the named range
Code:
Sub RefreshPivots()
Dim pt As PivotTable
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets
For Each pt In ws.PivotTables
pt.RefreshTable
Next pt
Next ws
End Sub