+ Reply to Thread
Results 1 to 7 of 7

Count duplicate sets of 2 numbers

  1. #1
    Forum Contributor
    Join Date
    07-17-2020
    Location
    Uzbek
    MS-Off Ver
    Office 365, V 2212
    Posts
    198

    Post Count duplicate sets of 2 numbers

    Hi Experts,

    I have 7 numbers in columns A:G and would like to count how many duplicate sets of 2 numbers are there.

    For instance, the result of (2 0 2 6 1 0 2) should be 2 because there are only 2 same set of duplicates (02 & 02).

    Appreciate if someone could provide me a formula, I have attached the sample also for easy reference.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Count duplicate sets of 2 numbers

    Please try

    =--TEXT(MAX(MMULT(COLUMN(A2:F2)^0,--(A2:F2&B2:G2=TRANSPOSE(A2:F2&B2:G2)))/(1+(A2:F2=B2:G2))),"[>1]0;\0")

    Confirm with Ctrl+Shift+Enter
    Attached Files Attached Files

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,203

    Re: Count duplicate sets of 2 numbers

    Bo_Ry... that looks awfully clever... even if I do not understand how it produces the correct answer with this string

    8 8 3 7 3 7 3

    which could potentially return 2x37s or 2x73s....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Contributor
    Join Date
    07-17-2020
    Location
    Uzbek
    MS-Off Ver
    Office 365, V 2212
    Posts
    198

    Re: Count duplicate sets of 2 numbers

    Hi Bo_Ry,

    Working perfectly thanks a lot.
    what if I want to count different set of duplicate numbers like the result of (1 1 2 2 0 0 1) should be 3 because there are 3 different 2 set of numbers (11 & 22 & 00)
    thanks in advance

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,203

    Re: Count duplicate sets of 2 numbers

    Why 11 22 and 00 and not 12, 20 & 01, as your two digit numbers seem to be able to start either from column A or column B. In any event, isn't the answer to your last Q ALWAYS going to be 3, irrespective of the digits present, as there are 7 columns.

    =INT(COLUMNS(A2:G2)/2)

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Count duplicate sets of 2 numbers

    Thanks, Glenn.

    8 8 3 7 3 7 7

    A2:F2&B2:G2=TRANSPOSE(A2:F2&B2:G2)

    This one check all "88","83","37","73","37","77"

    37 shows 2 times


    @Gulya
    count different set of duplicate numbers

    =MIN(3,SUM(--(A2:F2=B2:G2)))

  7. #7
    Forum Contributor
    Join Date
    07-17-2020
    Location
    Uzbek
    MS-Off Ver
    Office 365, V 2212
    Posts
    198

    Re: Count duplicate sets of 2 numbers

    Thanks Bo_Ry, as expected both formulas are working really amazing

+ 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] How to use SumProduct CountIf to count duplicate numbers as one?
    By DBrydon in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-27-2021, 06:54 AM
  2. Replies: 1
    Last Post: 04-22-2020, 02:45 PM
  3. MIN MAX using duplicate values across 3 sets of numbers
    By mrwiley in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-03-2019, 07:04 AM
  4. [SOLVED] Function to count duplicate or triplicate numbers occurrence in one cell
    By Karnik in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-19-2017, 11:04 PM
  5. [SOLVED] count non duplicate invoice numbers for a specific employee
    By bacardi510 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-26-2016, 04:31 PM
  6. Count duplicate numbers
    By sans in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-03-2011, 05:50 PM
  7. [SOLVED] How to count sets of numbers
    By JimDandy in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-29-2006, 05:45 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