+ Reply to Thread
Results 1 to 10 of 10

Data Validation fromn two different named range alternatives

  1. #1
    Registered User
    Join Date
    01-21-2013
    Location
    Suffolk
    MS-Off Ver
    Excel 2003
    Posts
    15

    Data Validation fromn two different named range alternatives

    I have a cell for which I need the only options for data to be entered from a list in two different tabs from which I understand cant be done but is it possible to have two drop down options for the same cell?

    The attached spreadsheet should explain this slightly better...
    Attached Files Attached Files

  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: Data Validation fromn two different named range alternatives

    Can't you simply combine the lists to form a single list and then use that list as the source for the drop down?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    01-21-2013
    Location
    Suffolk
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Data Validation fromn two different named range alternatives

    I tried this - on a separate tab created a formula that pulls through the data from the two "original" lists and created a "master" list to use as the named range. The problem with this is the to original lists are subject to change so when you insert a line and add a new entry this doesnt pull through to the "master" list hense isnt included in the data validation named range...

  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: Data Validation fromn two different named range alternatives

    Do you know what the maximum number of items can be for each list?

    For example, even though each list currently has 7 or 8 items, each list will never have more than 20 items.

  5. #5
    Registered User
    Join Date
    01-21-2013
    Location
    Suffolk
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Data Validation fromn two different named range alternatives

    Each list should bever have more than say 40 entries.

  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: Data Validation fromn two different named range alternatives

    You could do this...

    In some out of the way location on the sheet where you want the drop down lists...

    Enter the items that make up each list but leave some empty cells between the lists for future data addition.

    For example, enter list1 in the range Z3:Z43 and enter list2 in the range Z45:Z85.

    Now, let's use a formula to combine these 2 lists into a single list. This new list will be the source for the drop down.

    Enter this array formula** in AA3:

    =IFERROR(INDEX(Z:Z,SMALL(IF(Z$3:Z$100<>"",ROW(Z$3:Z$100)),ROWS(AA$3:AA3))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down to AA100.

    Now, as the source for the drop down lists use this formula:

    =OFFSET(AA$3,,,COUNTIF(AA$3:AA$100,"?*"))

  7. #7
    Registered User
    Join Date
    01-21-2013
    Location
    Suffolk
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Data Validation fromn two different named range alternatives

    Thanks - A bit over my head though I have to confess!

    I have attached what is effectively the actual spreadsheet I am trying to use with additional notes of exactly what I need to happen. Any chance you could take a look and make it work on that spreadsheet so I can copy it on to the workbook with all the data on I have??
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-21-2013
    Location
    Suffolk
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Data Validation fromn two different named range alternatives

    OK I just worked out your suggestion here unfortunately that doesnt work, the spreadsheet I attached should explain why but incase not - I need the drop down list to be automatically updated when you add a new cell on one of the other tabs...

    Thanks for trying - Much appreciated. Hopefully we can get it resolved!

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

    Re: Data Validation fromn two different named range alternatives

    I'll take a look at it tomorrow. Been kind of busy today.

  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: Data Validation fromn two different named range alternatives

    You might be better off using a VBA procedure to do this.

    There's no way using formulas that you can add to the data validation list. You have to use an event macro for that.

    I'm not much of a programmer so I can't help with this.

+ 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