+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Compare for Duplicate Values

  1. #1
    Registered User
    Join Date
    12-13-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Compare for Duplicate Values

    I have a table of 4 columns of text data. There are some duplicate values in these columns.

    List1 List2 List3 List4
    a a f m
    b c d n
    c e g o
    i d m c

    I want to be able to identify and delete the duplicates so that I have a table of 4 columns, with unique/discreet values, so that the result would look as follows:

    List1 List2 List3 List 4
    a e f m
    b d g n
    c o
    i

    Is there a way to do this without a macro?
    Any help would be much appreciated. Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Compare for Duplicate Values

    With your text lists in columns A:D, put this formula in F1, then copy down and across to column I:

    =IF(COUNTIF($A:$D,A1)>1, "", ROW())


    Then in L1 put this formula, and copy down/across to column O:

    =IF(ISERROR(SMALL(F:F,ROWS($A$1:$A1))), "", INDEX(A:A, MATCH(SMALL(F:F,ROWS($A$1:$A1)),F:F, 0)))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-13-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Compare for Duplicate Values

    Thank you JBeaucaire....your solution worked exactly as I described in my objective, I appreciate it very much. But, I guess I didn't think through my objective completely....what I really want to do is hold the list of text data in column A constant, and have the remaining data in columns in B:D show discreet values to column A and to each other:

    So from this:
    a b d c
    b g j f
    c h l g
    d i m j
    e j n o
    f k q p
    g q

    To this:

    a h l o
    b i m p
    c j n
    d k
    e
    f
    g

    My bad for not better describing my objective, if you have an equally elegant solution as you did for my initial query, I'd be most grateful. Thanks.

+ 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