+ Reply to Thread
Results 1 to 10 of 10

vba to copy a specific sheet from multiple workbooks to summary sheet

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    vba to copy a specific sheet from multiple workbooks to summary sheet

    I have several workbooks with several sheets in a folder C:\\summarydata (around 50 workbooks)

    focus to copy only specific sheets in these workbooks named worksheet CUSTOMER A. to a new sheet.(that is summarise all customer A sheet on one sheet)

    All customerA sheets has same format and headers from column A to AF then AJ TO AO.

    There are some headers who have blank column

    Note that all workbooks folder are closed
    Attached Files Attached Files

  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: vba to copy a specific sheet from multiple workbooks to summary sheet

    This macro assumes that your source files all have an "xlsx" extension (in red) and that they are the only files in your folder.
    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
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: vba to copy a specific sheet from multiple workbooks to summary sheet

    Tried code but getting compile error message , variable not defined

    strExtension in yellow

  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: vba to copy a specific sheet from multiple workbooks to summary sheet

    Do your source files have an "xlsx" extension?

  5. #5
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: vba to copy a specific sheet from multiple workbooks to summary sheet

    yes, I have put the code in a blank workbook
    Attached Images Attached Images
    Last edited by JEAN1972; 01-27-2019 at 01:07 PM. Reason: typo

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

    Re: vba to copy a specific sheet from multiple workbooks to summary sheet

    I tested the macro and it worked properly. Check the folder path--- C:\summarydata

  7. #7
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: vba to copy a specific sheet from multiple workbooks to summary sheet

    Still same issue
    create a new directory as c:\ss\ with files in it
    change parameter, still same issue
    Attached Images Attached Images
    Last edited by JEAN1972; 01-27-2019 at 01:56 PM. Reason: typo

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

    Re: vba to copy a specific sheet from multiple workbooks to summary sheet

    Try:
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: vba to copy a specific sheet from multiple workbooks to summary sheet

    Thank you this one works .

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

    Re: vba to copy a specific sheet from multiple workbooks to summary sheet

    My pleasure.

+ 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. Copy specific columns from multiple workbooks into(append) a new sheet.
    By praveendk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-15-2019, 07:04 AM
  2. Replies: 8
    Last Post: 03-14-2017, 07:31 PM
  3. [SOLVED] Paste data from one sheet to specific sheet in multiple workbooks
    By tstrebel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-30-2014, 01:34 PM
  4. vba to copy from multiple workbooks to a summary sheet in another workbook.
    By lisadykstra in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-22-2014, 03:36 PM
  5. Replies: 0
    Last Post: 07-29-2013, 03:00 AM
  6. [SOLVED] Summary sheet - copy cell contents from multiple sheets to one summary sheet
    By jsmity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2013, 10:32 AM
  7. [SOLVED] Macro To Copy Specific cells From Multiple Workbooks to New Summary Workbook
    By Mooseman60 in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 06-19-2012, 07:38 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