+ Reply to Thread
Results 1 to 11 of 11

VBA Code to copy data from dynamic list of worksheet names into summary sheet

  1. #1
    Registered User
    Join Date
    09-02-2011
    Location
    Caribbean
    MS-Off Ver
    Excel 2010
    Posts
    14

    VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Hello,

    The requirement is for a vba code that will copy worksheets based on a dynamic list of names and paste them into a summary sheet.

    I have searched and found very useful codes, however each use a fixed array for the worksheets, the requirement is for the array to be dynamic..


    Your assistance is greatly appreciated.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Untested but maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-02-2011
    Location
    Caribbean
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Thanks, JOHN. Your effort is greatly appreciated

    However similarly to the ones I have found, it copies every worksheet that is not named summary (If ActiveSheet.Name <> "Summary"). What is required is for the code to copy a list of sheets (list is not fixed).

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Where would the list be located?

  5. #5
    Registered User
    Join Date
    09-02-2011
    Location
    Caribbean
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Quote Originally Posted by JOHN H. DAVIS View Post
    Where would the list be located?
    The list is on a sheet named inv_dates. I use a code to populate the list based on a range selected b the user.

    The list has the sheet names in column D as shown in screenshot:

    sheet_names.jpg

    Thanks

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Maybe:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-02-2011
    Location
    Caribbean
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Thanks for the code. Getting the error type mismatch for the line
    Please Login or Register  to view this content.
    Not sure what triggered that as ws was declared as worksheet.


    Regards,
    Last edited by dt_org; 08-21-2014 at 09:52 AM.

  8. #8
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    change this line to

    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Oops:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    09-02-2011
    Location
    Caribbean
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    Thanks JOHN H. DAVIS and satputenandkumar0. This worked flawlessly!!!

    Regards,

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to copy data from dynamic list of worksheet names into summary sheet

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ 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: 1
    Last Post: 03-28-2013, 02:49 PM
  2. [SOLVED] Need Help w/ Code for Copy/Paste data for a Summary Worksheet
    By Langie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-26-2013, 05:21 PM
  3. [SOLVED] Maco 2 Copy dynamic data from multiple worksheets into Summary worksheet in same workbook
    By abrennan in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-16-2012, 03:40 AM
  4. Copy worksheet names into summary sheet
    By heathercoldsmith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2011, 06:09 PM
  5. how to copy data from mutiple worksheet to a summary sheet
    By pramu in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 08-04-2009, 06:32 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