+ Reply to Thread
Results 1 to 12 of 12

finding duplicates and triplicates between two lists

  1. #1
    Forum Contributor
    Join Date
    12-02-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    112

    finding duplicates and triplicates between two lists

    Hi,

    There are two list of numbers starting from A1 and B1 as followes:

    Please Login or Register  to view this content.
    A1 B1
    1 2
    2 1
    13 14
    13 14
    9 10
    Please Login or Register  to view this content.
    The desired result starting at C1 is 12and D1 is 14for duplicates.

    &

    Please Login or Register  to view this content.
    A1 B1
    6 7
    7 6
    6 7
    12 14
    12 14
    12 14
    7 11

    The desired result starting at C1 is12 and C2 is 14 for triplicates.

    I would like to request prospective contributers to provide some ideas in solving this issue.

    Thanks

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: finding duplicates and triplicates between two lists

    For array enter this in C1 and fill across. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Change criteria to =3 for triplicates.


    A
    B
    C
    D
    1
    1
    2
    13
    14
    2
    2
    1
    3
    13
    14
    4
    13
    14
    5
    9
    10
    Dave

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: finding duplicates and triplicates between two lists

    Bit of a messy description.
    What do you expect the output to look like?
    Here's a guess though I doubt its what you want.

    in C1
    =COUNTIF(A1:A12,A1)+COUNTIF(A1:A12,A1)
    in D1
    =COUNTIF(A1:A12,B1)+COUNTIF(B1:B12,B1)

    This will list the occurrences of the numbers in A1 and B1

    Or are you wanting a list of all numbers that occur more than once? In one column or two?

    The onus is on you to describe the output EXACTLY as you want it.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Contributor
    Join Date
    12-02-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: finding duplicates and triplicates between two lists

    Hi, FlameRetired

    That is the desired result as stated above as 13 is in C1 AND 14 is in D1 but while using the formula "=MIN(IF(COUNTIFS($A$1:$A$5,$A$1:$A$5,$B$1:$B$5,$B$1:$B$5)=2,A$1:A$5))" it not only displays 13 in c1 and 14 in d1 but it fills 13 & 14 all the way to c5 and d5 continuously , i think that formula needs some adjustment , please advise.

    thanks

  5. #5
    Forum Contributor
    Join Date
    12-02-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: finding duplicates and triplicates between two lists

    Hi, Special-K

    Below formula can find duplicates for example:

    "=IFERROR(INDEX(A$1:A$6,SMALL(IF(FREQUENCY($A$1:$A$6*$B$1:$B$6/($A$1:$A$6+$B$1:$B$6),$A$1:$A$6*$B$1:$B$6/($A$1:$A$6+$B$1:$B$6))>2,ROW($A$1:$A$6)-MIN(ROW($A$1:$A$6))+1),ROWS($1:1))),"")"


    A1 B1
    1 2
    2 1
    3 6
    3 6
    By using above formula it projects 1 at C1 AND 3 at C2 ALSO 2 AT D1 AND 6 AT D2 but what iam looking for is a formula which only projects 3 at C1 and 6 at D1 excluding "1, 2" because 3 and 6 are at same row not like 1,2 and 2,1.

    The below formula only projecets triple occurances for example:

    A1 B1
    1 2
    2 1
    1 2
    3 6
    3 6
    3 6

    "=IFERROR(INDEX(A$1:A$5,SMALL(IF(FREQUENCY($A$1:$A$5*$B$1:$B$5*$C$1:$C$5/

    ($A$1:$A$5+$B$1:$B$5+$C$1:$C$5),

    $A$1:$A$5*$B$1:$B$5*$C$1:$C$5/($A$1:$A$5+$B$1:$B$5+$C$1:$C$5))>1,ROW($A$1:$A$5)-

    MIN(ROW($A$1:$A$5))+1),ROWS($1:1))),"") "

    By using above formula it projects both 1,2 and 3, 6 at C1,C2 and D1, D2 simultaneously , but my desired projection is only 3 at C1 and 6 at D1 excluding 1 and 2 because 3 and 6 are at same row.

    Desperately waiting for appropriate solution from knowledgeable respected contributors.
    Thanks
    Last edited by LAVA2; 05-30-2018 at 05:43 AM. Reason: misiing statement

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: finding duplicates and triplicates between two lists

    I still don't understand this, probably because you are separating duplicates (occurs twice) and triplicates (occurs three times) into two lists.

    Let's start again.

    Here is a ONE list of singles, duplicates (occurs 2 times), triplicates (occurs 3 times) and quadruplets (occurs 4 times).
    NOTE: You only asked for duplicates and triplicates NOT quadruplets - I want to know how we should deal with qudaruplets (or more) if they ever occur.

    A B
    1 2
    2 13
    3 4
    3 13
    13 7
    14 16
    15 14
    16 14
    16 16

    Occurs twice: 2 and 3
    Occurs three times: 13 and 14
    Occurs four times:16

    Now what ouptut would you expect from the above data and in what columns?

  7. #7
    Forum Contributor
    Join Date
    12-02-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: finding duplicates and triplicates between two lists

    FOR:

    A B
    12 13
    12 13
    16 1
    1 16
    5 15
    6 18
    6 18
    6 18
    Desired duplicates results is ONLY:
    C1 D1
    12 13
    AND FOR

    A B
    12 13
    12 13
    16 1
    1 16
    5 15
    6 18
    6 18
    6 18
    15 3
    3 15
    3 15
    3 15
    Desired triplicate result is ONLY:
    C1 D1
    6 18
    THANKS

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: finding duplicates and triplicates between two lists

    Quote Originally Posted by LAVA2 View Post
    Hi, FlameRetired

    That is the desired result as stated above as 13 is in C1 AND 14 is in D1 but while using the formula "=MIN(IF(COUNTIFS($A$1:$A$5,$A$1:$A$5,$B$1:$B$5,$B$1:$B$5)=2,A$1:A$5))" it not only displays 13 in c1 and 14 in d1 but it fills 13 & 14 all the way to c5 and d5 continuously , i think that formula needs some adjustment , please advise.

    thanks
    That is because the ranges are "locked" or absolute references. That formula only applies to the first set of numbers posted in #1.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: finding duplicates and triplicates between two lists

    LAVA2 is your profile current?

    This would be much easier with new versions of Excel.

  10. #10
    Forum Contributor
    Join Date
    12-02-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: finding duplicates and triplicates between two lists

    Yes of course it is current profile, but isn't there any way to use that formula for excel 2007 ?

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: finding duplicates and triplicates between two lists

    No. The formula I have that works with multiple duplicates and triplicates requires MODE.MULT. It isn't available until Excel 2010.

    Still working on it.

  12. #12
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: finding duplicates and triplicates between two lists

    For duplicates:
    Try array entering this in C1 fill down and across column D until you get blanks. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    For triplicates array entered in C1 again.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 05-31-2018 at 02:44 AM.

+ 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. VBA remove unique, triplicates, quadruplicates, keep duplicates
    By Bigdanfoley in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-21-2016, 12:08 AM
  2. Highlighting sets of duplicates, triplicates, etc
    By Spotniq in forum Excel General
    Replies: 6
    Last Post: 09-16-2015, 01:31 PM
  3. Replies: 2
    Last Post: 12-27-2013, 09:24 AM
  4. [SOLVED] Counting Items in a column that have duplicates, triplicates and more
    By 4hyatts in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-26-2013, 08:59 PM
  5. Remove duplicates but not triplicates or more?
    By tuppari in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-09-2012, 08:23 AM
  6. [SOLVED] Duplicates, triplicates and more
    By jfd456 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2012, 10:35 AM
  7. formatting duplicates, triplicates and almost matches
    By GRichner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2009, 06:45 PM

Tags for this Thread

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