Hi Guys, hoping someone can help me.
i want to set a macro so that i copy a range from one excel file to another, however the source file name will change weekly, is there any way to have a macro that says something like, 'copy from file that begins with...' ? the current code i have is below:
Sub Macro2()
'
' Macro2 Macro
Workbooks("LS-GB_mbu_intl_rpt_20210510.xlsx").Worksheets("Export").Range("A2:D9").Copy
Workbooks("Reports.xlsm").Worksheets("Data").Range("A2").PasteSpecial Paste:=xlPasteValues
End Sub
name of the macro is macro2
source file is called LS-GB_mbu_intl_rpt_20210510.xlsx, however the numbers at the end will change every week.
destination file is called Reports.xlsm
many thanks in advance!