+ Reply to Thread
Results 1 to 7 of 7

Unique Validation List

  1. #1
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    287

    Unique Validation List

    Hi, I was wondering if their is any way where I could display only Unique Values within a Validation List. The source data has duplicate values but rather than selecting Unique Values I was hoping their might be a way to display this.

    I have attached a sample worksheet, if somebody could please help.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-16-2009
    Location
    Stellenbosch, South Africa
    MS-Off Ver
    Excel 2003; Excel 2007; Excel 2010; Excel 2013
    Posts
    136

    Re: Unique Validation List

    Nope, you're going to have to create a list of unique items I'm afraid. Even if you created a list of non-contiguous cells (e.g. $B$2,$B$4:$B$5,$B$8), you still wouldn't be able to use it as a validation list source. It will only accept contiguous ranges.

    For help on preparing unique lists see here: http://www.contextures.com/xladvfilter01.html#FilterUR
    Regards

    Jon (Excel 2003, 2007, 2010, 2013)

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Unique Validation List

    Hi, If you use advanced Filter, "Unique values" & select "Copy to another location", you can then use this new range for you "Validation List"
    Regards Mick

  4. #4
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    287

    Re: Unique Validation List

    Thanks for your response JONvdHeyden and MickG. Ideally I dont want to create another list of unique items to then select as my range as I was looking to automate this process.

    I have come across the following:

    http://www.cpearson.com/excel/NoDupEntry.aspx

    which uses a Custom Criteria with the following formula but this doesn't actually work so I dont know if this was using Excel 2007 rather than the 1997 that has been quoted on the URL page.

    I dont know if its possible to do something similar that would do the job.

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

    Re: Unique Validation List

    you can validate against a pivot table and use a dynamic named range in the validation
    refresh pivot when new data entered.
    right click in pivot table things area select field hide blank
    right click table
    options uncheck grand totals
    see named range "martin" for formula for dynamic range
    dropdown is in c1
    Attached Files Attached Files
    "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

  6. #6
    Forum Contributor
    Join Date
    04-16-2009
    Location
    Stellenbosch, South Africa
    MS-Off Ver
    Excel 2003; Excel 2007; Excel 2010; Excel 2013
    Posts
    136

    Re: Unique Validation List

    Quote Originally Posted by aftabn10 View Post
    Thanks for your response JONvdHeyden and MickG. Ideally I dont want to create another list of unique items to then select as my range as I was looking to automate this process.

    I have come across the following:

    http://www.cpearson.com/excel/NoDupEntry.aspx

    which uses a Custom Criteria with the following formula but this doesn't actually work so I dont know if this was using Excel 2007 rather than the 1997 that has been quoted on the URL page.

    I dont know if its possible to do something similar that would do the job.
    That article doesn't describe a method of how to create a validation list, it shows how to prevent duplicate entries from being added to a list. The COUNTIF method is valid in 2007 too.

    Martins suggestion of a pivot table is valid, but the truth is that you will need to build a unique list if you want to create a list of unique items in a validation list. Validation lists will not accept non-contiguous ranges or array constants so we couldn't even use a UDF to return a range of unique items. Sorry.

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

    Re: Unique Validation List

    Using this array formula u can create unique values

    =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))))))

    See attached file pls..
    But this formula is too long...

    Hope it helps
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

+ 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