Clean this Recorded Macro - Please Help?

mwalls33

New Member
Joined
Apr 25, 2018
Messages
19
All - I know this Macro can be cleaned - can someone please help me? I also wanted to know if I can change the value of my H and AH columns to only auto fill based from the value of number rows on B. Thank you so much!!!

Code:
Rows("2:2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.ClearContents
    Range("B2").Select
    Windows("ChangeRequest.xlsx").Activate
    Range("C2:D2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Windows("hum_cwk_info.csv").Activate
    ActiveSheet.Paste
    Range("H2").Select
    Windows("hum_cwk_info.csv").Activate
    Windows("ChangeRequest.xlsx").Activate
    Range("F2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Windows("hum_cwk_info.csv").Activate
    Range("J2").Select
    ActiveSheet.Paste
    Range("H2").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "=TODAY()"
    Range("H2").Select
    Selection.AutoFill Destination:=Range("H2:H350")
    Range("H2:H350").Select
    Windows("ChangeRequest.xlsx").Activate
    Range("B2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Windows("hum_cwk_info.csv").Activate
    Range("AG2").Select
    ActiveSheet.Paste
    Range("AH2").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "C"
    Range("AH2").Select
    Selection.AutoFill Destination:=Range("AH2:AH350")
    Range("AH2:AH350").Select
    Range("AD8").Select
    Windows("hum_cwk_info.csv").Activate
    Cells.Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Range("B2").Select
    Windows("Interface 1.xlsm").Activate
 
Last edited by a moderator:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top