A while ago, I created a master file that does a VLOOKUP and copies and does a bunch of other stuff. Things have changed and now I am updating the VBA code to accomodate a changing file name (every year). How would I update the attached code?
I will be going from "Master_Report.xlsm" and will be changing the file name to reference the year on a specific cell. I updated it to the following in most of the code "Master_Report_" & Range("T6").Value & ".XLSM"
Is there a way to adapt the new workbook name into the VLOOKUP line that is attached? I have tried a few things, but none them worked.
I will be going from "Master_Report.xlsm" and will be changing the file name to reference the year on a specific cell. I updated it to the following in most of the code "Master_Report_" & Range("T6").Value & ".XLSM"
Is there a way to adapt the new workbook name into the VLOOKUP line that is attached? I have tried a few things, but none them worked.
VBA Code:
Range("F2:F" & Range("A" & Rows.Count).End(xlUp).Row).Formula = "=VLOOKUP($D2&$G2,'[Master_Report.xlsm]Home Page'!$BC$50:$BD$343,2,FALSE)"