+ Reply to Thread
Results 1 to 10 of 10

how to collate list of unique values from multiple columns into a single column

  1. #1
    Registered User
    Join Date
    04-06-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Lightbulb how to collate list of unique values from multiple columns into a single column

    Hi

    I have a data in multiple columns with some repetitive values and i want to collate unique values (not duplicates) in a single column from these multiple columns.

    Can somebody please help me with excel or VB.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-04-2013
    Location
    Salt Lake City
    MS-Off Ver
    2010
    Posts
    84

    Re: how to collate list of unique values from multiple columns into a single column

    This should work

    HTML Code: 

  3. #3
    Registered User
    Join Date
    04-06-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: how to collate list of unique values from multiple columns into a single column

    Thanks for your help!! is there something that can be done through excel formula

  4. #4
    Registered User
    Join Date
    10-04-2013
    Location
    Salt Lake City
    MS-Off Ver
    2010
    Posts
    84

    Re: how to collate list of unique values from multiple columns into a single column

    Can the Data in Col 1,2,& 3 be placed into 1 column?

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: how to collate list of unique values from multiple columns into a single column

    There's an example of a formula method here:

    http://www.excelforum.com/excel-form...le-column.html
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    04-06-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: how to collate list of unique values from multiple columns into a single column

    I have these columns with huge data may be each column with 3000 row items, so it would be difficult to place them in single column. also it is associated with other data points.

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: how to collate list of unique values from multiple columns into a single column

    The macro below.

    After that data => remove duplicates on column N.


    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  8. #8
    Registered User
    Join Date
    04-06-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: how to collate list of unique values from multiple columns into a single column

    Great!! this answers my query however i have another question to it, how do i get same result if i have data not placed in adjacent columns like A, D, F etc..

  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: how to collate list of unique values from multiple columns into a single column

    Here is formula solution:

    Enter this array formula (Ctrl+Shift+Enter) in F2

    =IFERROR(IFERROR(IFERROR(INDEX($B$2:$B$4, MATCH(0, COUNTIF($F$1:F1, $B$2:$B$4)+($B$2:$B$4=""), 0)), INDEX($C$2:$C$4, MATCH(0, COUNTIF($F$1:F1, $C$2:$C$4)+($C$2:$C$4=""), 0))), INDEX($D$2:$D$4, MATCH(0, COUNTIF($F$1:F1, $D$2:$D$4)+($D$2:$D$4=""), 0))), "")

    A
    B
    C
    D
    E
    F
    1
    Col 1 Col 2 Col 3 Result
    2
    Apple Banana Lemon Apple
    3
    Orange Lemon Apple Orange
    4
    Lemon Banana Orange Lemon
    5
    Banana
    6
    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

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: how to collate list of unique values from multiple columns into a single column

    If the columns to evaluate followed a specific pattern then it could be done.

    Your columns: A, D, F etc.., do not follow a set pattern: A=1, D=4, F=6.

    Consider this example:



    Data Range
    A
    B
    C
    D
    E
    1
    ----
    ----
    ----
    ----
    ----
    2
    A
    B
    C
    3
    A
    B
    C
    4
    D
    F
    5
    D
    G
    H
    6
    7
    Count
    Uniques
    8
    7
    A
    9
    B
    10
    C
    11
    D
    12
    F
    13
    G
    14
    H
    15


    Enter this array formula** in A8. This will return the count of the unique items in the range.

    =SUM(IF(MOD(COLUMN(A2:E5),2)=1,IF(A2:E5<>"",1/COUNTIF(A2:E5,A2:E5))))

    Enter this array formula** in B8 and copy down until you get blanks.

    =IF(ROWS(B$8:B8)>A$8,"",INDEX(A$2:E$5,MIN(IF(MOD(COLUMN(A$2:E$5),2)=1,IF(A$2:E$5<>"",IF(ISNA(MATCH(A$2:E$5,B$7:B7,0)),ROW(A$2:E$5)-ROW(A$2)+1)))),MOD(MIN(IF(MOD(COLUMN(A$2:E$5),2)=1,IF(A$2:E$5<>"",IF(ISNA(MATCH(A$2:E$5,B$7:B7,0)),(ROW(A$2:E$5)-ROW(A$2)+1)*10^5+(COLUMN(A$2:E$5)-COLUMN(A$2)+1))))),10^5)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Last edited by Tony Valko; 10-14-2013 at 08:03 PM.

+ 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. Collate a list of unique items only from multiple sheets into specific categories
    By Boyler_Room in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-28-2013, 08:05 PM
  2. [SOLVED] Compare two columns and list the unique values in 3rd column
    By jewellove in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2013, 10:40 AM
  3. List all unique values from multiple sheets in specified column
    By whitelockben in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2011, 01:20 PM
  4. Replies: 11
    Last Post: 06-09-2011, 03:17 PM
  5. Replies: 5
    Last Post: 04-21-2011, 05:22 PM

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