Created a relatively simple macro and can't seem to get past the first 4 lines. Can anyone see what could be the potential problem with my macro below? It for some reason will not move on to the next tab which is Report 2 consistently. Help please.
Thanks!
Sub Clean_PayFac()
'
' Clean_PayFac Macro
' Clean initial pull, add columns, etc.
'
'
Rows("1:3").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft (it seems to stop right here)
Sheets("Report 2").Select
Rows("1:2").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Sheets(Array("Report 1", "Report 2")).Select
Sheets("Report 2").Activate
Cells.Select
Cells.EntireColumn.AutoFit
Sheets("Report 1").Select
Columns("F:F").Select
Selection.Copy
Columns("C:C").Select
Selection.Insert Shift:=xlToRight
Columns("D:D").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("D1").Select
ActiveCell.FormulaR1C1 = "Federal Tax ID"
Columns("E:E").Select
Range("E1").Select
ActiveCell.FormulaR1C1 = "Legal Name"
Range("G1").Select
ActiveCell.FormulaR1C1 = "Store Name"
Columns("G:G").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("G1").Select
ActiveCell.FormulaR1C1 = "Store Number"
Columns("G:G").Select
Columns("G:G").EntireColumn.AutoFit
Range("H1").Select
ActiveCell.FormulaR1C1 = "MID DBA Name"
Columns("J:J").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("J1").Select
ActiveCell.FormulaR1C1 = "Merchant Open Date"
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
Range("L1").Select
ActiveCell.FormulaR1C1 = "Basic Merchant Settlement"
Range("M1").Select
ActiveCell.FormulaR1C1 = "Basic Settlement R&T Bank Name"
Range("N1").Select
ActiveCell.FormulaR1C1 = "Advanced Settlement Option"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Advanced Routing & Transit Bank Name"
Range("P1").Select
ActiveCell.FormulaR1C1 = "Advanced Deposit DDA"
Range("P1").Select
ActiveCell.FormulaR1C1 = "Advanced Settlement Deposit DDA"
Sheets(Array("Report 1", "Report 2")).Select
Sheets("Report 2").Activate
Cells.Select
Cells.EntireColumn.AutoFit
Sheets("Report 1").Select
End Sub
Thanks!
Sub Clean_PayFac()
'
' Clean_PayFac Macro
' Clean initial pull, add columns, etc.
'
'
Rows("1:3").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft (it seems to stop right here)
Sheets("Report 2").Select
Rows("1:2").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Sheets(Array("Report 1", "Report 2")).Select
Sheets("Report 2").Activate
Cells.Select
Cells.EntireColumn.AutoFit
Sheets("Report 1").Select
Columns("F:F").Select
Selection.Copy
Columns("C:C").Select
Selection.Insert Shift:=xlToRight
Columns("D:D").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("D1").Select
ActiveCell.FormulaR1C1 = "Federal Tax ID"
Columns("E:E").Select
Range("E1").Select
ActiveCell.FormulaR1C1 = "Legal Name"
Range("G1").Select
ActiveCell.FormulaR1C1 = "Store Name"
Columns("G:G").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("G1").Select
ActiveCell.FormulaR1C1 = "Store Number"
Columns("G:G").Select
Columns("G:G").EntireColumn.AutoFit
Range("H1").Select
ActiveCell.FormulaR1C1 = "MID DBA Name"
Columns("J:J").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("J1").Select
ActiveCell.FormulaR1C1 = "Merchant Open Date"
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("L:L").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
Range("L1").Select
ActiveCell.FormulaR1C1 = "Basic Merchant Settlement"
Range("M1").Select
ActiveCell.FormulaR1C1 = "Basic Settlement R&T Bank Name"
Range("N1").Select
ActiveCell.FormulaR1C1 = "Advanced Settlement Option"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Advanced Routing & Transit Bank Name"
Range("P1").Select
ActiveCell.FormulaR1C1 = "Advanced Deposit DDA"
Range("P1").Select
ActiveCell.FormulaR1C1 = "Advanced Settlement Deposit DDA"
Sheets(Array("Report 1", "Report 2")).Select
Sheets("Report 2").Activate
Cells.Select
Cells.EntireColumn.AutoFit
Sheets("Report 1").Select
End Sub