Hello,
I have recorded this VBA, but I need it to apply to a different Name.
Sub Macro2()
'
' Macro2 Macro
'
' Sheets("Pivot").Select
Range("C21").Select
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").CurrentPage = _
"Alan O'Neill"
Sheets("Targets").Select
Selection.Copy
Application.Goto Reference:="Alan_ONeill"
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I tried to create a user form with a list of all the names, but that seem to complicated.
Can this be done in Excel?
Kind Regards
I have recorded this VBA, but I need it to apply to a different Name.
Sub Macro2()
'
' Macro2 Macro
'
' Sheets("Pivot").Select
Range("C21").Select
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name").CurrentPage = _
"Alan O'Neill"
Sheets("Targets").Select
Selection.Copy
Application.Goto Reference:="Alan_ONeill"
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I tried to create a user form with a list of all the names, but that seem to complicated.
Can this be done in Excel?
Kind Regards