+ Reply to Thread
Results 1 to 12 of 12

Copy every opened workbook to Master Workbook

  1. #1
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Post Copy every opened workbook to Master Workbook

    Hi

    My Question is similar to this thread.

    https://www.excelforum.com/excel-pro...-workbook.html

    I have one master excel file namely Master Data.xls.

    I need to open some other excel files one by one. (Manual only) then i need to copy Active sheet of whatever files i opened, to Active sheet of Master Data.xls then whatever file i opened that should be closed. (Not Master Data.xls)

    The range and format should be as how it was in the opened workbook.

    I tried the above thread code but its working vice versa

    Can someone help me to modify the code.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,806

    Re: Copy every opened workbook to Master Workbook

    Place this macro in Master Data.xls. Make sure both workbooks are open.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Copy every opened workbook to Master Workbook

    Hi Mumps1. Thank you so much for your code. I need to save this macro in personal macro workbook. Will it work. I will run when my active window is master excel file. Please suggest

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,806

    Re: Copy every opened workbook to Master Workbook

    This macro assumes that the workbook containing the macro and the workbook from which you want to copy the data are both open and that those two workbooks are the only ones that are open. I'm not sure how it would work if you save the macro workbook as you suggested.

  5. #5
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Copy every opened workbook to Master Workbook

    Hi Mumps1.

    I saved this macro in Master Data.Xls and executed. its not copying from other opened workbook (Only one other work book opened) and its closing the master data.xls file at finishing stage.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,806

    Re: Copy every opened workbook to Master Workbook

    Make sure the Master Data.Xls is the active workbook and try:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Copy every opened workbook to Master Workbook

    Hi Mumps1

    Perfect now its copy and pasting to Master Data.xLs. But while pasting the data its not same row as the file i opened, its pasting from A1. I want as its how its was in parent workbook with same format. (Like the data was in (C8: h8 same way i want to paste in master data.xls with formating.

    Please help

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,806

    Re: Copy every opened workbook to Master Workbook

    I assume that the range to be copied will be different in all the workbooks? If this is correct, is there any other data other than the range to be copied in each workbook?

  9. #9
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Copy every opened workbook to Master Workbook

    Yes correct range will be different, no other data to copy. Usually I will select all cells and then copy and go to master data XLS select all cells and paste in master data XLS as paste special and paste special format

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,806

    Re: Copy every opened workbook to Master Workbook

    Try:
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Copy every opened workbook to Master Workbook

    Hi Mumps1

    Thank you so much. Code is worked as expected. Thread marked as resolved, Rep Added

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,806

    Re: Copy every opened workbook to Master Workbook

    You are very welcome and thanks for the rep.

+ 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] VBA to copy cell from opened or closed workbook into another workbook
    By megtoma in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2014, 04:22 PM
  2. [SOLVED] Copy a Worksheet from a Closed Workbook to the Current Opened Workbook
    By glennchung in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-28-2014, 12:55 PM
  3. Use a macro to extract cell data from opened workbook to new opened workbook
    By BrianTFC in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2014, 01:35 PM
  4. Replies: 0
    Last Post: 04-26-2013, 03:40 AM
  5. Need to Copy Columns from Previous Workbook to Newly Opened Workbook
    By BYizz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-06-2012, 06:33 AM
  6. [SOLVED] Copy columns from one workbook to another when workbook is opened.
    By gilko86 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2012, 10:12 AM
  7. Automatic open others Workbook when we opened the Master Workbook
    By antoni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2009, 10:03 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