+ Reply to Thread
Results 1 to 10 of 10

Can you have a range name of a sheets that auto updates as sheets are created?

  1. #1
    Forum Contributor juntjoo's Avatar
    Join Date
    02-29-2008
    Location
    Cape Coral, FL
    MS-Off Ver
    Excel 2010 14.04.4760.1000
    Posts
    468

    Can you have a range name of a sheets that auto updates as sheets are created?

    I am about to create a range of sheet names to use in a drop down button but I'd like to avoid the need to manually update the list as I add sheets. Anyone have any solutions/creative ideas? Thanks

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Can you have a range name of a sheets that auto updates as sheets are created?

    How to generate a list of sheet names using a formula:

    https://www.excelforum.com/showthread.php?t=929969

    Once you get the name list generated let me know where it is.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor juntjoo's Avatar
    Join Date
    02-29-2008
    Location
    Cape Coral, FL
    MS-Off Ver
    Excel 2010 14.04.4760.1000
    Posts
    468
    Quote Originally Posted by Tony Valko View Post
    How to generate a list of sheet names using a formula:

    https://www.excelforum.com/showthread.php?t=929969

    Once you get the name list generated let me know where it is.
    Thanks. Wow. I'm in deep now. Only problem is it returned just one of sheets, the first one. I was expecting them all displayed across columns(or rows?) but I just got that one first sheet. Any ideas?
    Excel 1.0.1 (16.0.14326.20140) (Android)
    Excel 2010 14.04.4760.1000

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Can you have a range name of a sheets that auto updates as sheets are created?

    Here's a small sample file created in Excel 2007 that demonstrates this.

    Try adding new sheets, deleting sheets and renaming sheets and observe how the list of sheet names changes accordingly.
    Attached Files Attached Files

  5. #5
    Forum Contributor juntjoo's Avatar
    Join Date
    02-29-2008
    Location
    Cape Coral, FL
    MS-Off Ver
    Excel 2010 14.04.4760.1000
    Posts
    468
    Quote Originally Posted by Tony Valko View Post
    Here's a small sample file created in Excel 2007 that demonstrates this.

    Try adding new sheets, deleting sheets and renaming sheets and observe how the list of sheet names changes accordingly.
    Thank you. Didn't realize how it worked, that you had to use an instance of the formula for each item. Okay, got that.

    Now how do I get this list to work with a drop down menu? Do I make a name for the range/list of sheet names and pop that into the "source" field of the data validation setup window? I cannot drag over the list manually since it's not in the same sheet I'm creating the drop down menu and when I click to change sheets I get an error noise(actually I probably can just manually type it in right?).

    And ultimately will this sheet name list name, or however I link it to the drop down button, update from the button side? I've not spent much time on it yet but I just wanted to update and get my present ?? out. I'll report back. Thanks Tony. This is great help.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Can you have a range name of a sheets that auto updates as sheets are created?

    Let's assume you put the sheet names on Sheet1 starting in cell A1.

    Copy the formula down to allow for future sheet additions. Let's assume you copy the formula down to A10.

    Then, create this dynamic named range:

    Name: SheetNameList (or whatever you want to call it)
    Refers to:

    =OFFSET(Sheet1!$A$1,,,COUNTIF(Sheet1!$A$1:$A$10,"?*"))

    Then, as the source for your dropdown list use:

    =SheetNameList

  7. #7
    Forum Contributor juntjoo's Avatar
    Join Date
    02-29-2008
    Location
    Cape Coral, FL
    MS-Off Ver
    Excel 2010 14.04.4760.1000
    Posts
    468

    Re: Can you have a range name of a sheets that auto updates as sheets are created?

    Thanks again Tony. Unfortunately "Sheet1!$A$1:$A$10" isn't updating to Sheet1!$A$1:$A$11 as I add a sheet.

    1) which part of your formula is supposed to update that range as I add sheets?

    2) do I need to manually add the formulas to display the sheets in each cell of my sheet list or is there some instruction in there that adds the formulas?

    &

    3) could we have combined this new dynamic name "sheetNamesList" with the original "sheetNames" ? Just curious if this could be smaller/cleaner.

    Thanks again!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Can you have a range name of a sheets that auto updates as sheets are created?

    You haven't mentioned how many sheets you'll have. You need to copy the formula in A1 down to enough cells that will cover the maximum number of sheets you'll have. Is that 20? 50? 1000?

    For example, right now you might have 5 sheets but you might eventually add 5 more. So, you have to copy the formula in A1 down to at least A10 to allow for the future sheet additions.

    Then, simply expand the range of the dynamic range formula to ensure that it captures all the sheet names:

    =OFFSET(Sheet1!$A$1,,,COUNTIF(Sheet1!$A$1:$A$1000,"?*"))

  9. #9
    Forum Contributor juntjoo's Avatar
    Join Date
    02-29-2008
    Location
    Cape Coral, FL
    MS-Off Ver
    Excel 2010 14.04.4760.1000
    Posts
    468

    Re: Can you have a range name of a sheets that auto updates as sheets are created?

    okay, thats perfect. thanks

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Can you have a range name of a sheets that auto updates as sheets are created?

    You're welcome. Thanks for the feedback!

+ 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. Auto populate master sheet with value from newly created sheets
    By ElPolloDiablo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2015, 03:47 AM
  2. [SOLVED] Auto adjust sheets to specific range selection
    By hcyeap in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2014, 02:31 AM
  3. Replies: 0
    Last Post: 07-16-2013, 01:20 PM
  4. [SOLVED] identify unique ID between 2 sheets, auto replace cell values between sheets in diff colum
    By DT123456 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2012, 08:25 AM
  5. Automatic updates between sheets
    By ekat in forum Excel General
    Replies: 0
    Last Post: 09-17-2010, 04:45 PM
  6. Auto Summing from macro created sheets
    By moonyboy99 in forum Excel General
    Replies: 0
    Last Post: 07-23-2008, 05:38 AM
  7. Replies: 0
    Last Post: 12-08-2005, 05:50 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