+ Reply to Thread
Results 1 to 4 of 4

Named Range Problem

  1. #1
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Named Range Problem

    Hi

    I have a question that I hope someone can assist me with.

    I have ten named ranges relating to classes that are selected and then a dependent list is used for students to look up their names and enter a pin code to gain access to a test.

    I would normally use dynamic ranges but I understand that the indirect function will not work with a dynamic range.

    I have tried also using VBA to recreate the ranges if they change, but although I can recreate dynamic ranges I cannot get the "RefersTo" section to function correctly for a static range without empty cells.

    My question is, is there a way to use dependent lists with dynamic ranges? Alternatively with a static range that is larger than the data contained within it, is it possible to have the first cell displayed rather than the first empty cell?

    Many thanks for your comments

    Regards


    Jeff
    Last edited by solnajeff; 06-28-2008 at 02:13 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,935
    Several weeks ago there was a question on dynamic ranges ( I forget where or who supplied the solution); but, try this sol'n from those threads:
    Given: a changable list on Sheet2 column A,
    Then, define a name, myList, such that:
    Please Login or Register  to view this content.
    This should get you close with a few tweaks of the OFFSET parameters.
    Edit, see:
    http://www.contextures.com/xlNames01.html#Dynamic
    Last edited by protonLeah; 06-28-2008 at 03:52 AM. Reason: added link to dynamic range sol'ns
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Dependent Named Ranges

    HI

    Thanks for your comments.

    I know how to create dynamic named ranges but the problem is using dependent named ranges via the INDIRECT function which does not work with dynamic ranges. At least as far as I can establish.

    Regards

    Jeff

  4. #4
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Dependent Dynamic Ranges

    Hi

    I have found a workaround to the problem as follows, and did it this particular way so the worksheet presentation does not have to be changed.

    Data is entered by the user and as the sheet needs to be hidden after use, all code is attached to the button for hiding the sheet.

    All named ranges are generated using VBA as dynamic ranges (could not get the code to work for static ranges), after each dynamic range has been generated, the actual range is derived using "RefersToRange.Address" and the named range converted to a static one.

    I am sure there are simpler ways, but this works well for me.

    Regards

    Jeff

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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