+ Reply to Thread
Results 1 to 6 of 6

Select all sheets from a dynamic list

  1. #1
    Registered User
    Join Date
    12-01-2015
    Location
    Selby
    MS-Off Ver
    2013
    Posts
    66

    Select all sheets from a dynamic list

    I am looking for some code that utilises an array function to select a number of sheets based on a list.

    The list of sheets is dynamic and could range from 8-23 sheets but will be different pretty much every time used.

    I am happy to use a loop to go through the list or a dynamic range to establish the range that contains the cells.

    Once selected I then need to them copy these sheets to a new file.


    TIA

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Select all sheets from a dynamic list

    Hi,

    Here is an example assuming a named range that is a column, not a row
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

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

    Re: Select all sheets from a dynamic list

    Maybe:

    Please Login or Register  to view this content.
    Assumes list is in Column A.

  4. #4
    Registered User
    Join Date
    12-01-2015
    Location
    Selby
    MS-Off Ver
    2013
    Posts
    66

    Re: Select all sheets from a dynamic list

    xlnitwit - I plugged your code in as below
    Please Login or Register  to view this content.
    but at the command to copy the sheets I get a Run time error 9 - subscript out of range

    I have tried several snippets of code from across the net and they all seem to fail at this point so I am suspecting it's something machine specific possibly....?


    Thanks

  5. #5
    Registered User
    Join Date
    12-01-2015
    Location
    Selby
    MS-Off Ver
    2013
    Posts
    66

    Re: Select all sheets from a dynamic list

    I am an idiot......

    Part of my list of sheets is hard coded as they will always be part of the new workbook....I had a typo in the non dynamic part.......

    All working now!!!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,316

    Re: Select all sheets from a dynamic list

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. Create a dynamic list from multiple sheets
    By shbiskup in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-28-2022, 04:04 AM
  2. [SOLVED] Create a Dynamic Master List from 10 different sheets.
    By djshane in forum Excel General
    Replies: 3
    Last Post: 06-12-2016, 05:06 AM
  3. How to combine dynamic ranges from multiple sheets into one list?
    By mst3k in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-07-2015, 03:25 AM
  4. Select Multiple Sheets based on List
    By roasty_1 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-22-2014, 01:36 AM
  5. Select data to use on a set of sheets from a drop down list
    By royincanada in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-29-2012, 02:14 AM
  6. Need a Macro.Create new sheets from one, where need to select from a dropdown list
    By Javier091 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2011, 08:47 AM
  7. select last cell in a dynamic list using a macro
    By uncrox in forum Excel General
    Replies: 4
    Last Post: 07-19-2006, 08:35 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