Question about Macros [Closed]

Report
-
Hi,

I'm looking for help regarding macros/ adjusting a macro.

My issue:
I'm trying to copy and paste macros from 100s of files to 1 master file in excel. I'm using macros to do this however I have to open or download a file from an server and each file has a different name. I'm encountering trouble using the macro I created because after creating the macro using the 1st file all the subsequent files have different names. My second issue is that how do I make the data paste into the next empty row rather than replacing the data in the first row?

I have pasted what I have done so far but I was wondering if someone can take a look below and let me know how I can adjust the code so the macro copies from the file that is open? I would also be very grateful if someone also check if I properly adjusted the macro to paste the data in the next available row?

Thank you in advance!

Sub HandoffDocTestingSept9()
'
' HandoffDocTestingSept9 Macro
'
' Keyboard Shortcut: Ctrl+Shift+R
'
Range("A1").Select
Selection.End(xlDown).Select
Range("A4").Select
Windows("Copy of Handoff Template for testing on Sept 07 -2.xlsx").Activate
Range("C3:E3").Select
ActiveCell.FormulaR1C1 = "Year Country [+ Extension] - Client Name"
Windows("Hand off doc working doc v.4.xlsx").Activate
Range("A4").Select
ActiveCell.FormulaR1C1 = "Year Country [+ Extension] - Client Name"
Range("B4").Select
Windows("Copy of Handoff Template for testing on Sept 07 -2.xlsx").Activate
Range("C4").Select
ActiveCell.FormulaR1C1 = "Paris"
Windows("Hand off doc working doc v.4.xlsx").Activate
Range("B4").Select
ActiveSheet.Paste
Range("C4").Select
Windows("Copy of Handoff Template for testing on Sept 07 -2.xlsx").Activate
Range("C11").Select
ActiveCell.FormulaR1C1 = "3/11/2016"
Windows("Hand off doc working doc v.4.xlsx").Activate
Range("C4").Select
ActiveCell.FormulaR1C1 = "3/11/2016"
Range("D4").Select
Windows("Copy of Handoff Template for testing on Sept 07 -2.xlsx").Activate
Range("C13").Select
Selection.Copy
Windows("Hand off doc working doc v.4.xlsx").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("Copy of Handoff Template for testing on Sept 07 -2.xlsx").Activate
Range("C20").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Hand off doc working doc v.4.xlsx").Activate
Range("E4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("Copy of Handoff Template for testing on Sept 07 -2.xlsx").Activate
Range("C21").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Hand off doc working doc v.4.xlsx").Activate
Range("F4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("G4").Select
Windows("Copy of Handoff Template for testing on Sept 07 -2.xlsx").Activate
Range("C22").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Hand off doc working doc v.4.xlsx").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Selection.End(xlDown).Select
Range("H4").Select
End Sub

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!