+ Reply to Thread
Results 1 to 6 of 6

Extract unique items from a Table and place in a column

  1. #1
    Registered User
    Join Date
    10-09-2007
    Posts
    2

    Extract unique items from a Table and place in a column

    All,

    I feel cheated having to write this but I need some help.

    I want to create a numerical list (automatically) from a table.

    Simple............

    What I have is:

    5 5 5
    2 2 2
    1 1 6
    7 3 4
    81 45 82

    What I want it

    1
    2
    3
    4
    5
    6
    7
    45
    81
    82

    I am being a total dufus and cant get this worked out.

    I have tried pivots, if and buts but would possibly sell my soul, possibly a kidney to sort this one.

    I know it will be a simple one but right now I cant see the forest for the trees and my VB skills are sorely lacking.

    Anything would be gratefully recieved.

    Regards

    Stony

    ps Sorry if this has already been sorted in the forum but I could not see it.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This will get you close

    =SMALL($A$1:$C$5,ROW(A1))
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you download and install the free Morefunc utility from this site: http://xcell05.free.fr/english/ then you can use the Uniquevalues() function to do exactly what you want with one formula.

    If your data is in A1:C5, then first select a minimum of 15 cells (to cover possibility of all entries being unique) within one column where you want the results to appear. Then in the formula bar at the top of the Excel spreadsheet, enter formula: =UNIQUEVALUES(A1:C5,1) and hold the CTRL+SHIFT keys down while pressing ENTER.... you should see your sorted unique value list appear.
    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.

  4. #4
    Registered User
    Join Date
    10-09-2007
    Posts
    2
    Chaps

    That is great but I work in an enviroment that will not allow any additions to a program. God Love IT.

    Is there a way of completing the list with a vb program that I can add to a macro?

    Cheers

    Stony

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See if this helps. I named the range but you can use a range like
    Please Login or Register  to view this content.
    Code goes in a regular module and will create the list in the next column

    http://www.contextures.com/xlvba01.html#Regular

    Please Login or Register  to view this content.
    VBA Noob
    Last edited by VBA Noob; 10-26-2007 at 06:20 PM.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525
    Quote Originally Posted by Evilshrew
    What I have is:

    5 5 5
    2 2 2
    1 1 6
    7 3 4
    81 45 82

    What I want it

    1
    2
    3
    4
    5
    6
    7
    45
    81
    82
    try
    Please Login or Register  to view this content.

+ 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