Hello All
I'm trying to merge a pivot table macro file from one worksheet to another workbook. When I merge and run macro, it gives the above error and also user defined error. I also tried pivottable 1 instead of 5. No luck. Any help is appreciated. Thanks Everyone
I'm trying to merge a pivot table macro file from one worksheet to another workbook. When I merge and run macro, it gives the above error and also user defined error. I also tried pivottable 1 instead of 5. No luck. Any help is appreciated. Thanks Everyone
Code:
Sub Rollup()
'
' Rollup Macro
'
'
Dim LR As Long
LR = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
Sheets("Enterprise Lane Roll Up").Select
ActiveSheet.PivotTables("PivotTable5").PivotCache.Refresh
Columns("A:I").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("J2").Select
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("J2:J" & LR), Type:=xlFillDefault
Range("J2:J" & LR).Select
Columns("J:J").Select
Range("J397").Activate
Selection.Copy
Attachments
Last edited by a moderator: