+ Reply to Thread
Results 1 to 6 of 6

Dynamically expanding the source range for a data validation list.

  1. #1
    Registered User
    Join Date
    06-05-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    2

    Dynamically expanding the source range for a data validation list.

    Hi all,

    It's my first post here so please don't be too harsh if my post in miscategorized. I am working on a relatively simple nutrition tracking calculation worksheet.

    I have two worksheets:

    Worksheet A-contains a table with a list of foods and several columns that contain the nutrition information.

    Worksheet B-contains food entry drop down lists and runs simple SUM() calculations on them and presents me with a chart of the data.

    My question is the following; my food list drop down is populated from the food list table. How can I make it dynamically expand the selected range of cells whenever I add a new food (row) into my food table? I would like my source range selection to grow by the number of rows that I am adding to my table.

    Any input is appreciated.

  2. #2
    Registered User
    Join Date
    07-27-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Dynamically expanding the source range for a data validation list.

    There's a couple answers to this that I'm aware of. I you (or the person editing the worksheet) is smart or will read instructions, you can always insert a cell in the middle of the list. The bottom cell will be moved down, but the list reference should simply expand to allow for new entry.

    Alternatively, you could format the list as a table, and instructions on that vary by excel version. Which do you have?

  3. #3
    Registered User
    Join Date
    06-16-2011
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Dynamically expanding the source range for a data validation list.

    create the table of dropdown list.then provide the range in the source of data validation.

    When ever you want to add the new value just insert the new row in table and input tha value.The value will be present in the dropdown list

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dynamically expanding the source range for a data validation list.

    Use a Dynamic Named Range to source the DV List: http://www.contextures.com/xlNames01.html#Dynamic

    If you use the same named range in functions then let us know and we can provide you with an alternative construct that is less volatile than OFFSET.

  5. #5
    Registered User
    Join Date
    06-05-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Dynamically expanding the source range for a data validation list.

    All,

    Thanks very much for your input. I will try out your suggestions and let you know how it goes. I am building this application in Excel 2007.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dynamically expanding the source range for a data validation list.

    alternatively use index rather than offset
    http://www.contextures.com/xlNames03.html
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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