Hi guys,
What I am trying to accomplish is actually pretty simple but I am having a hard time putting it into VBA. If you are ever so nice to help me, I suggest opening up my sample desensitized Workbooks to follow along. Reading the following without them opened might make it seem way more complicated than it is. Thank you so much in advance.
Overview (more details to come)
I am trying to get a Macro to open up an Excel Workbook that would be saved in a folder always in the same path, once opened copy a range from it, and paste it in a 3rd workbook where there is a Master table that consolidates it all. Essentially the macro I am trying to create would be auto updating this Master table workbook in the background.
There are 3 Workbooks involved in the process.
Reconciliation [main workbook that I want to run the macro on]
YTD 2018 by Name [where we go get the data]
Summary [where we paste the data]
Description
step [1]
In Workbook “Reconciliation” in Range(“D2:D3”) the user will input a Date in D2 (end date) & D3 (start date). The Workbook named “YTD by Name” will always be save under this name format but with a date at the end. I.e September 14th 2018 would be “YTD by Name 14092018”. So I am looking to use the user's input in Workbook “Reconciliation” in Range (“D2:D3”) to dictate which “YTD by Name ddmmyy“ file to open.
YTD by Name ddmmyy path is: "C:\MyDocuments\Reports\new\”
step [2]
Once the appropriate “YTD by Name ddmmyy” file is open, I would like to select everything from the Table, starting on A10 using xlDown & xlRight -> Selection Copy
There are 2 dates on the previous Workbook “Reconciliation” in Range (“D2:D3”) because I am looking to open 2 of these reports, and copy both ranges sequentially, the reason is that I have this Workbook called Summary that calculates the difference between the Numbers to show the total within this selected date range
step [3]
Once data from “YTD by Name ddmmyy” is copied, I would like to Open Workbook “Summary” and paste it in the appropriate Sheet. If it was the Start Date report we copied than paste it in the tab called Workbook(“Summary”).Sheet(“Start date”) at cell B2, next do the exact same with the End Date report and paste it in B2 on Sheet(“End Date”)
Worksheet: Summary path is: "C:\MyDocuments\Summary\”
step [4]
That’s all I want to do, at this point simply Save Workbook (“Summary”) and close the other two that we copied the data from w/out saving
Sorry if that was a lot of information, I tried to diligently write what I am triyng to do, it is a lot easier to type than actually do. I am really stuck here and can really use any help I can get. Thanks a lot if you can help me
Bookmarks