Situation: Every month I need to take a source of data and re-format it so I can dump it into another file and update a pivot table. I want to automate the reformatting piece however I can't quite figure out the best way. Ideally, I would download the data source from online, copy the workbook to this Automated Workbook and run the macro. So I've recorded the Macro I need. See below for reference however now when I try to run to the copied over worksheet I get an "out of range" error. I'm guessing I need something that will allow me to run the Macro on this copied over sheet or all sheets of the workbook?
Current Code:
Sub Macro8()
'
' Macro8 Macro
'
' Keyboard Shortcut: Ctrl+Shift+M
'
ActiveSheet.ListObjects("Combined3").Range.AutoFilter Field:=6, Criteria1:= _
"A_AS1001 - UCS"
Columns("I:I").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.ColumnWidth = 6.43
Columns("M:N").Select
Selection.Cut
Columns("J:J").Select
Selection.Insert Shift:=xlToRight
Columns("L:L").Select
Selection.Cut
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
Columns("P:P").Select
Selection.Insert Shift:=xlToRight
Range("P1").Select
ActiveCell.FormulaR1C1 = "Amount Ads"
Range("P193").Select
Columns("P:P").ColumnWidth = 17.71
End Sub