+ Reply to Thread
Results 1 to 2 of 2

Creating a list (data validation) fromt wo different source ranges

  1. #1
    tony
    Guest

    Creating a list (data validation) fromt wo different source ranges

    hi everybody. i was wondering if it was possible to create a drop-down list
    out of two different source ranges? like creating a list from range A1:A50
    and A80:A120?
    then these would just appear altogether in one drop-down list? thanks.

  2. #2
    Max
    Guest

    Re: Creating a list (data validation) fromt wo different source ranges

    "tony" wrote:
    > wondering if it was possible to create a drop-down list
    > out of two different source ranges?
    > like creating a list from range A1:A50 and A80:A120?
    > then these would just appear altogether in one drop-down list?


    One way to get it to work ..

    Assume the discontiguous source ranges* are in sheet: X
    possibly housed within A1 down to say A200
    *may comprise several ranges, not just 2 ranges

    In a new sheet named simply as say: Z

    Put in A1:
    =IF(ROW()>COUNT(B:B),"",INDEX(X!A:A,MATCH(SMALL(B:B,ROW()),B:B,0)))

    Put in B1:
    =IF(X!A1="","",ROW())

    Select A1:B1, copy down to B200
    (cover the expected extent in X's col A)

    Then click Insert > Name > Define, input:
    Names in workbook: MyRange (say)
    Refers to:
    =OFFSET(Z!$A$1,,,SUMPRODUCT(--(Z!$A$1:$A$200<>"")))
    Click OK

    Test it out ... In any sheet, create the DVs with Allow: List, Source:
    =MyRange. The DVs' droplists will display the entire listing that's within
    X's col A, wo the blank/empty cells in-between the source ranges.

    And if you were to subsequently insert or delete rows within X's A1:A200,
    just remember to re-enter the top row formulas in Z's A1:B1, & re-fill the
    formulas to cover accordingly, post-insertion/deletion.
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---

+ 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