+ Reply to Thread
Results 1 to 15 of 15

List of unique text values from a list with duplicates

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    18

    List of unique text values from a list with duplicates

    I'm having difficulty creating a list that does not include any duplicated value. The list of unique values, needs to be in a different sheet and I need to retain the original list with duplicate values.

    Here's' the original list. Col-c is simply identifying if the value ind Col-D is the first occurrence and uses the formula =countif($d$8:$d8,d8)=1 in C8 which is copied down.

    c d


    TRUE 20030300RGATES
    TRUE 20030300LWEISS
    TRUE 20030300TWELCH
    TRUE 20030300CCHEN
    TRUE 20030300EKNUTH
    TRUE 20030300JBLOESER
    FALSE 20030300LWEISS
    FALSE 20030300RGATES
    TRUE 20030300SFLETCHER
    TRUE 20030300SMCCOVEY
    FALSE 20030300TWELCH

    I want to end up with the list below in a different sheet.

    20030300RGATES
    20030300LWEISS
    20030300TWELCH
    20030300CCHEN
    20030300EKNUTH
    20030300JBLOESER
    20030300SFLETCHER
    20030300SMCCOVEY

    Thanks for any help.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: List of unique text values from a list with duplicates

    you don't mention why you can't use Filter >> Advanced >> copy to another location >> unique records only?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,744

    Re: List of unique text values from a list with duplicates

    try
    =IFERROR(INDEX(Sheet1!$A$2:$A$50, MATCH(0, COUNTIF($A$1:A1, Sheet1!$A$2:$A$60), 0)),"")

    enter as an array formula using

    control+shift+enter

    assuming the data is in column A sheet1 range row 2 - 60
    and the data is extracted into column A row 2 sheet2
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: List of unique text values from a list with duplicates

    On the next sheet, put this in A2, copied down....
    =IFERROR(INDEX(Sheet3!$D$1:$D$11,MATCH(0,INDEX(COUNTIF($A$1:A1,Sheet3!$D$1:$D$11),0,0),0)),"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  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: List of unique text values from a list with duplicates

    Regular formula

    =IFERROR(INDEX($D$2:$D$12,MATCH(0,INDEX(COUNTIF($E$1:E1,$D$2:$D$12),,),)),"")

    D
    E
    1
    2
    20030300RGATES 20030300RGATES
    3
    20030300LWEISS 20030300LWEISS
    4
    20030300TWELCH 20030300TWELCH
    5
    20030300CCHEN 20030300CCHEN
    6
    20030300EKNUTH 20030300EKNUTH
    7
    20030300JBLOESER 20030300JBLOESER
    8
    20030300LWEISS 20030300SFLETCHER
    9
    20030300RGATES 20030300SMCCOVEY
    10
    20030300SFLETCHER
    11
    20030300SMCCOVEY
    12
    20030300TWELCH
    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

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

    Re: List of unique text values from a list with duplicates

    Try this...

    Data:

    Sheet1
    A
    1
    Header
    2
    20030300RGATES
    3
    20030300LWEISS
    4
    20030300TWELCH
    5
    20030300CCHEN
    6
    20030300EKNUTH
    7
    20030300JBLOESER
    8
    20030300LWEISS
    9
    20030300RGATES
    10
    20030300SFLETCHER
    11
    20030300SMCCOVEY
    12
    20030300TWELCH


    Results:

    Sheet2
    A
    1
    Header
    2
    20030300RGATES
    3
    20030300LWEISS
    4
    20030300TWELCH
    5
    20030300CCHEN
    6
    20030300EKNUTH
    7
    20030300JBLOESER
    8
    20030300SFLETCHER
    9
    20030300SMCCOVEY
    10
    11


    This array formula** entered in A2 and copied down until you get blanks:

    =IFERROR(INDEX(Sheet1!A$2:A$12,MATCH(0,COUNTIF(A$1:A1,Sheet1!A$2:A$12),0)),"")

    ** 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.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Registered User
    Join Date
    01-10-2014
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: List of unique text values from a list with duplicates

    The list is the result of formulas. Advanced filter copies the formula but, it would work if there were a way to copy unique values. Also, I simplified my example by only providing a single column. In actuality of have a list for each month and would need to only add the value to the list if it isn't already in the consolidated list.

  8. #8
    Registered User
    Join Date
    01-10-2014
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    18

    Thumbs up Re: List of unique text values from a list with duplicates

    Tony,

    Thanks. This solved the problem I was trying to solve.

    The problem was actually the interim step to solving this for a list of multiple columns. (ie Jan, Feb, Mar, Apr, etc.)

    Ron

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: List of unique text values from a list with duplicates

    Im happy you got your question solved Im just curious - as far as I can see, all the formulas offered were essentially the same, what made you pick Tony's "

    Mine =IFERROR(INDEX(Sheet3!$D$1:$D$11,MATCH(0,INDEX(COUNTIF($A$1:A1,Sheet3!$D$1:$D$11),0,0),0)),"")
    Alkey =IFERROR(INDEX($D$2:$D$12,MATCH(0,INDEX(COUNTIF($E$1:E1,$D$2:$D$12),,),)),"")
    Tony =IFERROR(INDEX(Sheet1!A$2:A$12,MATCH(0,COUNTIF(A$1:A1,Sheet1!A$2:A$12),0)),"")

  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 of unique text values from a list with duplicates

    It's possible to extract the unique entries from a 2 dimensional range but it's very complicated.

    There's an example here:

    http://www.excelforum.com/excel-form...le-column.html

  11. #11
    Registered User
    Join Date
    01-10-2014
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: List of unique text values from a list with duplicates

    I don't exactly know why. I guess Tony's just happened to be the first one I came to when I scrolled up the screen. I don't use the board often and didn't even realize the other replies at the time. However, now that look back, I think the visual table Tony provided, (as well as AlKey), is very useful to see the formulas references.

  12. #12
    Registered User
    Join Date
    01-10-2014
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: List of unique text values from a list with duplicates

    Thanks Tony, I will look into it.

  13. #13
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: List of unique text values from a list with duplicates

    this solution aint technically excel, but...............

    ever tried new google sheets ?

    https://docs.google.com/spreadsheets...EjtYvcNNB_bGcE

    In Sheet1, Column D it has a list of values

    In Sheet2, Column D, Range("D1") it has a very simple formula
    Please Login or Register  to view this content.
    As values change or are added to Sheet1 column D, the values in Sheet2 will automatically change
    Last edited by ThirtyTwo; 03-11-2014 at 05:31 PM. Reason: google docs = google sheets

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

    Re: List of unique text values from a list with duplicates

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: List of unique text values from a list with duplicates

    Sorry, I neglected to add etaf's formula in my list, that too, is pretty much the same

+ 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] Turning a list with duplicates into a unique list?
    By alfgrey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-10-2014, 07:34 PM
  2. [SOLVED] Remove duplicates to create list of unique values?
    By hulayogi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-17-2013, 01:46 PM
  3. [SOLVED] Creating a unique list from a list of duplicates
    By ssu in forum Excel Programming / VBA / Macros
    Replies: 38
    Last Post: 04-29-2013, 08:19 AM
  4. Replies: 1
    Last Post: 04-19-2013, 02:25 AM
  5. [SOLVED] Short list of values from long list of duplicates
    By Hang Glider in forum Excel General
    Replies: 4
    Last Post: 04-21-2012, 07:13 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