Hello, I have a repetitive task in excel, I need to refresh a pivot table select the name and copy and paste data. This is what I have done so far.
Sheets("Pivot").Select
Range("B15").Select
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").CurrentPage = _
"Alan O'Neill"
Sheets("Targets").Select
Range("B5").Select
Selection.Copy
Application.Goto Reference:="Alan_ONeill"
Sheets("Pivot").Select
Range("B22").Select
Application.CutCopyMode = False
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").CurrentPage = _
"Andrew Ferry"
Sheets("Targets").Select
Selection.Copy
Application.Goto Reference:="Andrew_Ferry"
I need to know how to refresh and select the name in the drop down box.
Kind Regards
Sheets("Pivot").Select
Range("B15").Select
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").CurrentPage = _
"Alan O'Neill"
Sheets("Targets").Select
Range("B5").Select
Selection.Copy
Application.Goto Reference:="Alan_ONeill"
Sheets("Pivot").Select
Range("B22").Select
Application.CutCopyMode = False
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").CurrentPage = _
"Andrew Ferry"
Sheets("Targets").Select
Selection.Copy
Application.Goto Reference:="Andrew_Ferry"
I need to know how to refresh and select the name in the drop down box.
Kind Regards