I need help with my code. In step 4 my data is getting pasted. Can anyone help? Thanks!!!
Sub AccelaCompliance()
'
' Step1 Macro
'
'
Sheets.Add After:=ActiveSheet
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Formatted"
Sheets("BH - Board Up Report Full").Select
Cells.Select
Selection.Copy
Sheets("Formatted").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Rows("1:1").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
'
' Step2 Macro
'
'
Sheets("BH - Board Up Report Full").Select
ActiveWindow.SelectedSheets.Delete
'
' Step3 Macro
'
'
Range("A:A,B:B,G:G,H:H,J:J,K:K,Q:Q,R:R,S:S,T:T,U:U,V:V,W:W").Select
Range("W1").Activate
Selection.ClearContents
Range("A1").Select
'
' Step4FinalFinal Macro
'
'
ActiveCell.FormulaR1C1 = "=MID(RC[4],1,SEARCH(CHAR(10),RC[4])-1)"
Range("A2").Select
Selection.AutoFill Destination:=Range("A2:A11244"), Type:=xlFillDefault
Range("A2:A11244").Select
Columns("A:A").Select
Range("A11210").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.Replace What:="#VALUE!", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
'
' Step5 Macro
'
'
ActiveCell.FormulaR1C1 = "Address"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Zip Code"
Range("B2").Select
'
' Step6 Macro
'
'
Range("B2").Select
ActiveCell.FormulaR1C1 = "=RIGHT(RC[3],5)"
Range("B2").Select
Selection.AutoFill Destination:=Range("B2:B11041"), Type:=xlFillDefault
Range("B2:B11041").Select
ActiveWindow.SmallScroll Down:=-15
ActiveWindow.ScrollRow = 10991
ActiveWindow.ScrollRow = 10974
ActiveWindow.ScrollRow = 10940
ActiveWindow.ScrollRow = 10924
ActiveWindow.ScrollRow = 10907
ActiveWindow.ScrollRow = 10321
ActiveWindow.ScrollRow = 10203
ActiveWindow.ScrollRow = 10002
ActiveWindow.ScrollRow = 8143
ActiveWindow.ScrollRow = 7674
ActiveWindow.ScrollRow = 7389
ActiveWindow.ScrollRow = 5529
ActiveWindow.ScrollRow = 5412
ActiveWindow.ScrollRow = 4725
ActiveWindow.ScrollRow = 4608
ActiveWindow.ScrollRow = 4407
ActiveWindow.ScrollRow = 3368
ActiveWindow.ScrollRow = 3184
ActiveWindow.ScrollRow = 3016
ActiveWindow.ScrollRow = 1609
ActiveWindow.ScrollRow = 1559
ActiveWindow.ScrollRow = 1291
ActiveWindow.ScrollRow = 1240
ActiveWindow.ScrollRow = 1190
ActiveWindow.ScrollRow = 637
ActiveWindow.ScrollRow = 553
ActiveWindow.ScrollRow = 403
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 285
ActiveWindow.ScrollRow = 336
ActiveWindow.ScrollRow = 403
ActiveWindow.ScrollRow = 419
ActiveWindow.ScrollRow = 403
ActiveWindow.ScrollRow = 336
ActiveWindow.ScrollRow = 319
ActiveWindow.ScrollRow = 202
ActiveWindow.ScrollRow = 185
ActiveWindow.ScrollRow = 151
ActiveWindow.ScrollRow = 118
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 1
Columns("B:B").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
'
' Step7 Macro
'
'
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
'
' Step8 Macro
'
'
Range("D2:D10637").Select
ActiveWindow.ScrollRow = 10605
ActiveWindow.ScrollRow = 10589
ActiveWindow.ScrollRow = 10555
ActiveWindow.ScrollRow = 10421
ActiveWindow.ScrollRow = 10337
ActiveWindow.ScrollRow = 10203
ActiveWindow.ScrollRow = 7808
ActiveWindow.ScrollRow = 7271
ActiveWindow.ScrollRow = 6719
ActiveWindow.ScrollRow = 2413
ActiveWindow.ScrollRow = 2229
ActiveWindow.ScrollRow = 369
ActiveWindow.ScrollRow = 235
ActiveWindow.ScrollRow = 185
ActiveWindow.ScrollRow = 1
Columns("D:D").Select
Selection.NumberFormat = "000-00-000"
'
' Step9 Macro
'
'
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D:D").Select
Selection.Delete Shift:=xlToLeft
Columns("I:I").Select
Selection.Cut
Columns("D:D").Select
ActiveSheet.Paste
'
' Step10 Macro
'
'
Range("E1").Select
ActiveCell.FormulaR1C1 = "Purchase Order #"
Range("E2").Select
ActiveCell.FormulaR1C1 = _
"=IFS(RC[1]=""A & D ENTERPRISES LLC."",""PS2022*0201"",RC[1]=""AMERICAN GENERAL BUILDERS LLC."",""PS2022*0198"",RC[1]=""AVILES CONSTRUCTION COMPANY INC."",""PS2023*0173"",RC[1]=""INNER CITY DEMOLITION & DISPOSAL LLC"",""PS2023*0174"")"
Range("E2").Select
Selection.AutoFill Destination:=Range("E2:E11041")
Range("E2:E11041").Select
Columns("E:E").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'
' Step11 Macro
'
'
Columns("M:M").Select
Selection.Replace What:="#", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
'
' Step12 Macro
'
'
Columns("J:J").Select
Selection.Cut
Columns("F:F").Select
Selection.Insert Shift:=xlToRight
Range("F1").Select
ActiveCell.FormulaR1C1 = "Amount"
Columns("G:I").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("G1").Select
ActiveCell.FormulaR1C1 = "Ward"
Range("H1").Select
ActiveCell.FormulaR1C1 = "No. of Units"
Range("I1").Select
ActiveCell.FormulaR1C1 = "Qty"
Range("J1").Select
ActiveCell.FormulaR1C1 = "Vendor"
Columns("P:P").Select
Selection.Cut
Columns("K:K").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=-3
Columns("N:O").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.Style = "Comma"
Range("A1").Select
Application.CutCopyMode = False
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$K$11041"), , xlYes).Name _
= "Table1"
Range("Table1[#All]").Select
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleMedium2"
ActiveWindow.SmallScroll Down:=-9
End Sub
Sub AccelaCompliance()
'
' Step1 Macro
'
'
Sheets.Add After:=ActiveSheet
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Formatted"
Sheets("BH - Board Up Report Full").Select
Cells.Select
Selection.Copy
Sheets("Formatted").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Rows("1:1").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
'
' Step2 Macro
'
'
Sheets("BH - Board Up Report Full").Select
ActiveWindow.SelectedSheets.Delete
'
' Step3 Macro
'
'
Range("A:A,B:B,G:G,H:H,J:J,K:K,Q:Q,R:R,S:S,T:T,U:U,V:V,W:W").Select
Range("W1").Activate
Selection.ClearContents
Range("A1").Select
'
' Step4FinalFinal Macro
'
'
ActiveCell.FormulaR1C1 = "=MID(RC[4],1,SEARCH(CHAR(10),RC[4])-1)"
Range("A2").Select
Selection.AutoFill Destination:=Range("A2:A11244"), Type:=xlFillDefault
Range("A2:A11244").Select
Columns("A:A").Select
Range("A11210").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.Replace What:="#VALUE!", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
'
' Step5 Macro
'
'
ActiveCell.FormulaR1C1 = "Address"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Zip Code"
Range("B2").Select
'
' Step6 Macro
'
'
Range("B2").Select
ActiveCell.FormulaR1C1 = "=RIGHT(RC[3],5)"
Range("B2").Select
Selection.AutoFill Destination:=Range("B2:B11041"), Type:=xlFillDefault
Range("B2:B11041").Select
ActiveWindow.SmallScroll Down:=-15
ActiveWindow.ScrollRow = 10991
ActiveWindow.ScrollRow = 10974
ActiveWindow.ScrollRow = 10940
ActiveWindow.ScrollRow = 10924
ActiveWindow.ScrollRow = 10907
ActiveWindow.ScrollRow = 10321
ActiveWindow.ScrollRow = 10203
ActiveWindow.ScrollRow = 10002
ActiveWindow.ScrollRow = 8143
ActiveWindow.ScrollRow = 7674
ActiveWindow.ScrollRow = 7389
ActiveWindow.ScrollRow = 5529
ActiveWindow.ScrollRow = 5412
ActiveWindow.ScrollRow = 4725
ActiveWindow.ScrollRow = 4608
ActiveWindow.ScrollRow = 4407
ActiveWindow.ScrollRow = 3368
ActiveWindow.ScrollRow = 3184
ActiveWindow.ScrollRow = 3016
ActiveWindow.ScrollRow = 1609
ActiveWindow.ScrollRow = 1559
ActiveWindow.ScrollRow = 1291
ActiveWindow.ScrollRow = 1240
ActiveWindow.ScrollRow = 1190
ActiveWindow.ScrollRow = 637
ActiveWindow.ScrollRow = 553
ActiveWindow.ScrollRow = 403
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 285
ActiveWindow.ScrollRow = 336
ActiveWindow.ScrollRow = 403
ActiveWindow.ScrollRow = 419
ActiveWindow.ScrollRow = 403
ActiveWindow.ScrollRow = 336
ActiveWindow.ScrollRow = 319
ActiveWindow.ScrollRow = 202
ActiveWindow.ScrollRow = 185
ActiveWindow.ScrollRow = 151
ActiveWindow.ScrollRow = 118
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 1
Columns("B:B").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
'
' Step7 Macro
'
'
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
'
' Step8 Macro
'
'
Range("D2:D10637").Select
ActiveWindow.ScrollRow = 10605
ActiveWindow.ScrollRow = 10589
ActiveWindow.ScrollRow = 10555
ActiveWindow.ScrollRow = 10421
ActiveWindow.ScrollRow = 10337
ActiveWindow.ScrollRow = 10203
ActiveWindow.ScrollRow = 7808
ActiveWindow.ScrollRow = 7271
ActiveWindow.ScrollRow = 6719
ActiveWindow.ScrollRow = 2413
ActiveWindow.ScrollRow = 2229
ActiveWindow.ScrollRow = 369
ActiveWindow.ScrollRow = 235
ActiveWindow.ScrollRow = 185
ActiveWindow.ScrollRow = 1
Columns("D:D").Select
Selection.NumberFormat = "000-00-000"
'
' Step9 Macro
'
'
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D:D").Select
Selection.Delete Shift:=xlToLeft
Columns("I:I").Select
Selection.Cut
Columns("D:D").Select
ActiveSheet.Paste
'
' Step10 Macro
'
'
Range("E1").Select
ActiveCell.FormulaR1C1 = "Purchase Order #"
Range("E2").Select
ActiveCell.FormulaR1C1 = _
"=IFS(RC[1]=""A & D ENTERPRISES LLC."",""PS2022*0201"",RC[1]=""AMERICAN GENERAL BUILDERS LLC."",""PS2022*0198"",RC[1]=""AVILES CONSTRUCTION COMPANY INC."",""PS2023*0173"",RC[1]=""INNER CITY DEMOLITION & DISPOSAL LLC"",""PS2023*0174"")"
Range("E2").Select
Selection.AutoFill Destination:=Range("E2:E11041")
Range("E2:E11041").Select
Columns("E:E").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'
' Step11 Macro
'
'
Columns("M:M").Select
Selection.Replace What:="#", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
'
' Step12 Macro
'
'
Columns("J:J").Select
Selection.Cut
Columns("F:F").Select
Selection.Insert Shift:=xlToRight
Range("F1").Select
ActiveCell.FormulaR1C1 = "Amount"
Columns("G:I").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("G1").Select
ActiveCell.FormulaR1C1 = "Ward"
Range("H1").Select
ActiveCell.FormulaR1C1 = "No. of Units"
Range("I1").Select
ActiveCell.FormulaR1C1 = "Qty"
Range("J1").Select
ActiveCell.FormulaR1C1 = "Vendor"
Columns("P:P").Select
Selection.Cut
Columns("K:K").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=-3
Columns("N:O").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.Style = "Comma"
Range("A1").Select
Application.CutCopyMode = False
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$K$11041"), , xlYes).Name _
= "Table1"
Range("Table1[#All]").Select
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleMedium2"
ActiveWindow.SmallScroll Down:=-9
End Sub