+ Reply to Thread
Results 1 to 1 of 1

Open Workbook in background, Copy Data, Paste in another Workbook

  1. #1
    Registered User
    Join Date
    09-21-2018
    Location
    Toronto, ON
    MS-Off Ver
    2013
    Posts
    18

    Open Workbook in background, Copy Data, Paste in another Workbook

    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
    Attached Files Attached Files
    Last edited by popcorn7; 09-21-2018 at 03:14 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Open Workbook in background, Copy Data, Paste in another Workbook
    By popcorn7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2018, 03:17 PM
  2. Macro VBA to copy and paste cells from one open workbook to another open workbook
    By bloomingcarrot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2014, 07:55 PM
  3. Simple Open Workbook, Copy Sheet, Paste In New Workbook Question
    By alulla in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2013, 02:10 PM
  4. Replies: 6
    Last Post: 01-29-2013, 07:01 AM
  5. Open workbook, filter values, copy/paste into Active workbook.
    By niceguy21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 12:17 PM
  6. Replies: 2
    Last Post: 09-11-2012, 09:42 AM
  7. Simple task: Open a workbook, copy a range, paste into another workbook
    By fbonetti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2011, 01:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1