+ Reply to Thread
Results 1 to 6 of 6

Two validations

  1. #1
    Registered User
    Join Date
    02-17-2008
    Posts
    51

    Two validations

    Hello everyone,

    I need your help!

    I have 2 columns in a table. I would like to populate each column in the validation list.

    Example:
    Col1 Col2
    A 1
    A 2
    A 3
    B 4
    B 5
    C 6
    C 7
    C 8
    C 9

    I would like to put the 1st column in the 1st validation list without duplicates. If for example, A is selected, the second validation list will only show 1,2,and 3. Is this possible? Could you please provide an sample formula?

    Your help on this is appreciated.

    Statsman

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Two validations

    Have a look at this thread using comboboxes and vba.

    http://www.excelforum.com/excel-prog...bobox-1-a.html
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-17-2008
    Posts
    51

    Re: Two validations

    Hi NVBC,

    Unfortunately, I do not require the combo boxes as the selections should be populated in each depending on the number of rows. I would like to utilize these validations as selections in another table. Let's pretend that the user has chosen the data from the table I have posted originally.

    For example:
    Name Validation1 Validation2
    George A 1
    Brenda B 3
    Coreen C 4
    Alex A 1

    Is this possible?

    Thanks,

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Two validations

    Try look again solution that NBVC gave you:

    http://www.contextures.com/xlDataVal02.html

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Two validations

    Quote Originally Posted by Statsman View Post
    Hi NVBC,

    Unfortunately, I do not require the combo boxes as the selections should be populated in each depending on the number of rows. I would like to utilize these validations as selections in another table. Let's pretend that the user has chosen the data from the table I have posted originally.

    For example:
    Name Validation1 Validation2
    George A 1
    Brenda B 3
    Coreen C 4
    Alex A 1

    Is this possible?

    Thanks,
    Unless you create a unique list of the first column elsewhere and refer to that in your data validation list, then you will see duplicates... then you can continue as per the link provided by zbor.

  6. #6
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Two validations

    I was thinking for about 2 hours over it and hope it helps.

    Here's creted Unique List

    Formula for unique List:
    =IF(ISERROR(INDEX(A1:A29,SMALL(IF(IF(ISERROR(MATCH(A1:A29,A1:A29,0)),"",MATCH(A1:A29,A1:A29,0))<>ROW(INDIRECT("1:"&ROWS(1:29))),"",IF(ISERROR(MATCH(A1:A29,A1:A29,0)),"",MATCH(A1:A29,A1:A29,0))),ROW(INDIRECT("1:"&ROWS(1:29)))))),"",INDEX(A1:A29,SMALL(IF(IF(ISERROR(MATCH(A1:A29,A1:A29,0)),"",MATCH(A1:A29,A1:A29,0))<>ROW(INDIRECT("1:"&ROWS(1:29))),"",IF(ISERROR(MATCH(A1:A29,A1:A29,0)),"",MATCH(A1:A29,A1:A29,0))),ROW(INDIRECT("1:"&ROWS(1:29))))))

    Than Created formula for depending list

    =OFFSET($B$1,MATCH($E$2,$A:$A,0),,COUNTIF($A:$A,$E$2))


    In short see the book!!!

    Hope it help
    Attached Files Attached Files

+ 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