+ Reply to Thread
Results 1 to 9 of 9

Listing all the unique values from one column into another column

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    57

    Listing all the unique values from one column into another column

    Say I have a column with 100 rows. It is randomly populated such that 30 of the rows have values, the rest are blank. There are only 5 UNIQUE values among the 30 total values, so many duplicates.

    I want a new column beside it which displays the 5 unique values in rows 1-5. So basically it eliminates the blanks and duplicates. How do I do this?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,647

    Re: Listing all the unique values from one column into another column

    Try a 'pivot table' or 'advanced filter'
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Listing all the unique values from one column into another column

    Assuming you data in column A and the rang starts in A2 and ends in E100

    In B2 copy and paste this formula and drag it down

    =INDEX($A$2:$A$100,MATCH(0,INDEX(COUNTIF($B$1:B1,$A$2:$A$100),0,0),0))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    01-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    57

    Re: Listing all the unique values from one column into another column

    Thanks a bunch guys. AlKey's index forumla did the job, but I may read up on pivot tables too because they sound useful as well.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Listing all the unique values from one column into another column

    You're welcome and thanks for the feedback!

    Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

  6. #6
    Registered User
    Join Date
    01-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    57

    Re: Listing all the unique values from one column into another column

    Quick follow up, if I drag the B2 formula down too far, I get #N/A errors. Is there a way to convert these into a 0 instead? I could even do it on the row over. Like =if(B2="any number",B2,0) or something.

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Listing all the unique values from one column into another column

    Sure

    =IFERROR(INDEX($A$2:$A$100,MATCH(0,INDEX(COUNTIF($B$1:B1,$A$2:$A$100),0,0),0)),0)

  8. #8
    Registered User
    Join Date
    01-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    57

    Re: Listing all the unique values from one column into another column

    You rock. I really need to learn more of these excel functions. But in the meantime the help is much appreciated!

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Listing all the unique values from one column into another column

    Glad to be of help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Filter rows based on unique values in one column + specific value in another column
    By Dieneces in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2013, 09:55 AM
  2. Replies: 8
    Last Post: 05-15-2013, 04:50 PM
  3. [SOLVED] Macro to count unique values in a column, enter it in next column, then delete duplicates
    By pmorisse in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2013, 03:27 PM
  4. Count Unique Values In One Column Basis Unique Values in Another Column
    By shez_raz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2012, 01:55 AM
  5. Listing Unique Values from a Column
    By Rabi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2008, 09:39 AM

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