+ Reply to Thread
Results 1 to 7 of 7

Making a list of unique items in a column

  1. #1
    Registered User
    Join Date
    12-31-2008
    Location
    Alaska, (not Anchorage)
    MS-Off Ver
    Excel 2010, 2016, and 365
    Posts
    78

    Making a list of unique items in a column

    Arrgh-
    I've been using the following snippet to create a list of unique values in a column. It works great as long as the list of unique values and the column being parsed are on the same table. I'm having the darndeest time doing this where the list is on one table in a workbook and the column of mixed values in another table in the same workbook. Here's the formula where both columns are on the same page:

    {=IF(ISNA(OFFSET($A$1,MATCH(0,MMULT(--TRANSPOSE(TRANSPOSE($A$1:$A$13)=B$1:B1),ROW(INDIRECT("1:"&ROW()-1))/ROW(INDIRECT("1:"&ROW()-1))),0)-1,0,1,1)),"",OFFSET($A$1,MATCH(0,MMULT(--TRANSPOSE(TRANSPOSE($A$1:$A$13)=B$1:B1),ROW(INDIRECT("1:"&ROW()-1))/ROW(INDIRECT("1:"&ROW()-1))),0)-1,0,1,1))}

    The above goes in the second cell down (B2) where B1 would be the first value in the mixed column, (eg B1=A1)
    ...and here's the one I've been putzing with between pages:

    =IF(ISNA(OFFSET(data!D2:D100,MATCH(0,MMULT(--TRANSPOSE(TRANSPOSE(data!D2:D100)=A$3:A3),ROW(INDIRECT("1:"&ROW()-1))/ROW(INDIRECT("1:"&ROW()-1))),0)-1,0,1,1)),"",OFFSET(data!D2:D100,MATCH(0,MMULT(--TRANSPOSE(TRANSPOSE(data!D2:D100)=A$3:A3),ROW(INDIRECT("1:"&ROW()-1))/ROW(INDIRECT("1:"&ROW()-1))),0)-1,0,1,1))

    ...where "data" is the name of the table with the mixed column.
    Last edited by portsample; 06-30-2011 at 07:44 PM.

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

    Re: Making a list of unique items in a column

    Try placing the table in the same sheet first, and applying the formula so that it works as you described... then cut and paste that table to the data sheet. The formula should automatically adjust the ranges to include the sheetname.
    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
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Making a list of unique items in a column

    Why not Advanced Filter unique entries?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    12-31-2008
    Location
    Alaska, (not Anchorage)
    MS-Off Ver
    Excel 2010, 2016, and 365
    Posts
    78

    Re: Making a list of unique items in a column

    Quote Originally Posted by NBVC View Post
    Try placing the table in the same sheet first, and applying the formula so that it works as you described... then cut and paste that table to the data sheet. The formula should automatically adjust the ranges to include the sheetname.
    Ooooh, that worked w/my example. This I can use to reverse engineer a solution. THANKS!

  5. #5
    Registered User
    Join Date
    12-31-2008
    Location
    Alaska, (not Anchorage)
    MS-Off Ver
    Excel 2010, 2016, and 365
    Posts
    78

    Re: Making a list of unique items in a column

    I'm having a problem making a list of unique items in a column.

    The column is on one page of a workbook (D2:D14) and the list is on another page. It works fine when the list is from A1:A13, however when I cut and paste down 2 cells to A3:A15. The function has problems.

    Here is the function:

    {=OFFSET(data!$D$2,MATCH(0,MMULT(--TRANSPOSE(TRANSPOSE(data!$D$2:$D$14)=A$1:A1),ROW(INDIRECT("1:"&ROW()-1))/ROW(INDIRECT("1:"&ROW()-1))),0)-1,0,1,1)}

    I've spent some time tinkering w/it and can't seem to make progress...is anyone familiar w/the above issue?

    I've attached a copy of the workbook for review. Thanks.
    Attached Files Attached Files

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

    Re: Making a list of unique items in a column

    Try this adjustment in the Indirect functions:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-31-2008
    Location
    Alaska, (not Anchorage)
    MS-Off Ver
    Excel 2010, 2016, and 365
    Posts
    78

    Re: Making a list of unique items in a column

    Quote Originally Posted by NBVC View Post
    Try this adjustment in the Indirect functions:

    Please Login or Register  to view this content.
    That got it- Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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