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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,213,559
Messages
6,114,302
Members
448,564
Latest member
ED38

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