+ Reply to Thread
Results 1 to 9 of 9

Copy Sheets from another workbook.

  1. #1
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Copy Sheets from another workbook.

    Hello together,
    my request sounds simple and I hope it is simple.
    I need a script that copies 2 excel sheets together.
    When the script starts, an Explorer window should pop up, with which I can call the 2nd Excel-Workbook.
    If the book is selected, all contents from the selected workbook should be copied in a way that the contents within the sheets that have the same name as the sheet in the already open workbook are copied with one line spacing below the contents.
    This means that only the contents of the sheets with the same name as the sheet in the already open workbook should be copied under the already open sheet with one line space in between.
    If there are sheets which do not have corresponing names, will be ignored.
    It suffices to copy the formatting and the values. I do not need formulas.

    I hope you can help me.
    Thank you very much.

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

    Re: Copy Sheets from another workbook.

    Try this macro. The destination worksheet must be named "Summary" and a sheet with that name must not exist in the source workbook in order for this macro to work properly.

    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-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Copy Sheets from another workbook.

    Many thanks for the excellent script.
    It works great.

    However, it copies all data of the selected 2nd workbook into the 'Summary' sheet and not under every single sheet with the same name as the selected sheet.

    The script should compare which sheet names of the two excel files match and copy the data of the selected 2nd workbook separately to the corresponding sheets under the existing data.

    I apologize if I misunderstood what I said in the first post.

    Many greetings

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

    Re: Copy Sheets from another workbook.

    Try:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Copy Sheets from another workbook.

    This is perfect.
    It is exactly what solves the problem.
    And I can use the other script as well.

    Thanks al lot you are awesome.
    I bow to you.

  6. #6
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Copy Sheets from another workbook.

    I just found out one more thing.

    Is it possible to copy the mismatching sheets from the selected workbook also to the original workbook with the same sheet name
    So I merged all information from the 2nd sheet into one.
    Those that are matching and the additional ones.

    Thanks again very much.

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

    Re: Copy Sheets from another workbook.

    Try:
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    05-24-2020
    Location
    London
    MS-Off Ver
    Office 365 pro
    Posts
    177

    Re: Copy Sheets from another workbook.

    This hits the spot.
    Thanks again.
    You're great and my hero.

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

    Re: Copy Sheets from another workbook.

    You are very welcome.

+ 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. Replies: 3
    Last Post: 02-16-2018, 06:40 PM
  2. [SOLVED] Copy Sheets from Closed Workbook into Open Active Workbook without linking
    By CHRISOK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2018, 04:54 PM
  3. Replies: 0
    Last Post: 07-01-2015, 03:33 PM
  4. [SOLVED] Copy All Visible Sheets To New Workbook Excluding Specific Sheets
    By ezrizer in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-19-2012, 02:19 PM
  5. Replies: 4
    Last Post: 09-15-2012, 02:18 PM
  6. Copy sheets from different workbooks to specific sheets in one workbook
    By erikfae in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2011, 08:02 AM
  7. Automatically Copy sheets in one workbook to create sheets in a new workbook..
    By leebarratt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2011, 03:14 AM

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