Hello, I am back again with a new challenge (at least challenging for me). Actually, I have a 2 fold problem that I need help solving.
A. I have a PO report that will be download every Tues & Thurs.
B. The resulting Excel file will always be archived in the same folder (path is constant).
C. The naming convention for the Excel files is “PO_Report” + “YYYYMMDD”. Example for today (Thurs the 6th): ...."PO_Report_20140306.xlsx".
D. The second piece that is missing is a vlookup statement that will find the newly opened workbook (the target sheet will always be “Summary”).
1. A. If today is Tuesday, I need code to find last Thursday’s report (minus 5 days) and open it. So, basically {Workbooks.Open Filename:="C:\Path/”Previous report.xlsx”}
B. If today is Thursday, find last Tuesday’s report (minus 2 days) and open it.
2. Then I need a vlookup from the current report finding data in the newly opened archive report. So, basically…… vlookup(A2,’[newly opened archive.xlsx]Summary’! $C:$G,4,FALSE)
Again path is constant, file name changes by "today -5" or "today -2" days, and sheet name is constant.
Please let me know if my description is not clear.
Any help is greatly appreciated!!! Thank you!
Bookmarks