+ Reply to Thread
Results 1 to 10 of 10

List unique values from multiple columns

  1. #1
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    List unique values from multiple columns

    Hello,
    I've searched through old posts and just can't seem to find the right solution for my needs.
    The attached sample workbook has four columns of data (A5 thru D168). Much of the data in these columns is duplicate. I need to create a new column (column E) that simply lists the unique values of my entire data set (e.g., A5 thru D168). I'd like to ignore blank cells.
    Any help would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: List unique values from multiple columns

    Is this a one off task or to be repeated.

    If the former then the pragmatic answer is to copy all the values from A:D into the single column E and then select all the column E value and use the 'Remove Duplicates' option from the Ribbon menu.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    Re: List unique values from multiple columns

    Great question, Richard. I'll end up recording a macro to repeat the process, so your solution may indeed work.

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

    Re: List unique values from multiple columns

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    Re: List unique values from multiple columns

    Actually, I don't know how to past data from multiple columns into a single column. Embarrassing.

  6. #6
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    Re: List unique values from multiple columns

    Hi Biff -
    Thanks so much for the response. There's a chance I'm being dense; but I can't get your second formula to work for me (from the post link you sent me).
    Using my original sample workbook, I created the following formula. Unfortunately, I'm getting the "#N/A" message.

    {=IF(ROWS(F$6:F6)>E$6,"",INDEX(A$6:D$300,MIN(IF(A$6:D$300<>"",IF(ISNA(MATCH(A$6:D$300,F$1:F1,0)),ROW(A$6:D$300)-ROW(A$6)+1))),MOD(MIN(IF(A$6:D$300<>"",IF(ISNA(MATCH(A$6:C$300,F$1:F1,0)),(ROW(A$6:D$300)-ROW(A$6)+1)*10^5+(COLUMN(A6:D300)-COLUMN(A6)+1)))),10^5)))}

    Any clues?
    Thanks again.
    Jeff

  7. #7
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    Re: List unique values from multiple columns

    Hi Biff -
    Thanks so much for the response. There's a chance I'm being dense; but I can't get your second formula to work for me (from the post link you sent me).
    Using my original sample workbook, I created the following formula. Unfortunately, I'm getting the "#N/A" message.

    {=IF(ROWS(F$6:F6)>E$6,"",INDEX(A$6:D$300,MIN(IF(A$6:D$300<>"",IF(ISNA(MATCH(A$6:D$300,F$1:F1,0)),ROW(A$6:D$300)-ROW(A$6)+1))),MOD(MIN(IF(A$6:D$300<>"",IF(ISNA(MATCH(A$6:C$300,F$1:F1,0)),(ROW(A$6:D$300)-ROW(A$6)+1)*10^5+(COLUMN(A6:D300)-COLUMN(A6)+1)))),10^5)))}

    Any clues?
    Thanks again.
    Jeff

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

    Re: List unique values from multiple columns

    Quote Originally Posted by macrorookie View Post

    {=IF(ROWS(F$6:F6)>E$6,"",INDEX(A$6:D$300,MIN(IF(A$6:D$300<>"",IF(ISNA(MATCH(A$6:D$300,F$1:F1,0)),ROW(A$6:D$300)-ROW(A$6)+1))),MOD(MIN(IF(A$6:D$300<>"",IF(ISNA(MATCH(A$6:C$300,F$1:F1,0)),(ROW(A$6:D$300)-ROW(A$6)+1)*10^5+(COLUMN(A6:D300)-COLUMN(A6)+1)))),10^5)))}
    The highlighted range should be D$300.

    Here's your file with this implemented.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    02-05-2014
    Location
    Bay Area
    MS-Off Ver
    Excel 2010
    Posts
    164

    Re: List unique values from multiple columns

    Thank you so much, Biff. Perfect solution. Your help is greatly appreciated.

  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: List unique values from multiple columns

    You're welcome. Thanks for the feedback!

+ 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] Combining list of Unique Values from Multiple Columns and with Total Value
    By masood78 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-11-2016, 07:27 PM
  2. Replies: 2
    Last Post: 06-16-2016, 08:09 PM
  3. List of Unique Values from Multiple Columns
    By filkod in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-06-2015, 03:57 AM
  4. [SOLVED] Need to make a list of unique values using 3 different columns..
    By CyBrian in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-26-2014, 07:10 PM
  5. Replies: 9
    Last Post: 10-14-2013, 07:55 PM
  6. 3 columns: None contain unique values, but I need a list of every unique set
    By mathematician in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-15-2012, 04:47 PM
  7. 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