+ Reply to Thread
Results 1 to 68 of 68

Counting Match Pairs In Rows

  1. #1
    Registered User
    Join Date
    08-23-2005
    Posts
    2

    Counting Match Pairs In Rows

    I am trying to count the number of matched pairs by rows of data and place this into a chart. Please see the screen shot example and manual solution.

    With the data sets:
    1-2-3-4
    1-3-4-5
    2-3-4-6
    3-4-5-6

    I want to fill out the chart to find the number of times say 1&2 occur in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be filled into the result matrix.

    Thanks for your help!
    Attached Images Attached Images

  2. #2
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  3. #3
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  4. #4
    Registered User
    Join Date
    08-23-2005
    Posts
    2

    Alternate Solution

    Thanks so much for your solution. I countinued to try and solve my issue and came up with another method. Both seem to have their pros and cons.

    In my solution, I made another matrix that counts which numbers come up in each data set. Then I did a sumproduct for each pair. See the attached zip spreadsheet.

    Thanks again!
    Attached Files Attached Files

  5. #5
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  6. #6
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  7. #7
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  8. #8
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  9. #9
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  10. #10
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  11. #11
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  12. #12
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  13. #13
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  14. #14
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  15. #15
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  16. #16
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  17. #17
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  18. #18
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  19. #19
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  20. #20
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  21. #21
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  22. #22
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  23. #23
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  24. #24
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  25. #25
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  26. #26
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  27. #27
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  28. #28
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  29. #29
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  30. #30
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  31. #31
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  32. #32
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  33. #33
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  34. #34
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  35. #35
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  36. #36
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  37. #37
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  38. #38
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  39. #39
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  40. #40
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  41. #41
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  42. #42
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  43. #43
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  44. #44
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  45. #45
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  46. #46
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  47. #47
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  48. #48
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  49. #49
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  50. #50
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  51. #51
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  52. #52
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  53. #53
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  54. #54
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  55. #55
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  56. #56
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  57. #57
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  58. #58
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  59. #59
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  60. #60
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  61. #61
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  62. #62
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  63. #63
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  64. #64
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  65. #65
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  66. #66
    Max
    Guest

    Re: Counting Match Pairs In Rows

    One way which delivers what you're after ..
    (with result matrix extended to cover: 0,1,2,3 ... 9 on both axes)

    Link to sample file:
    http://www.savefile.com/files/6483947
    File: Counting Match Pairs In Rows_bmb2000_wksht.xls

    In Sheet1:

    Data is in cols B to E, from row3 down

    Put in S3:X3

    S3: =B3&C3
    T3: =B3&D3
    U3: =B3&E3
    V3: =C3&D3
    W3: =C3&E3
    X3: =D3&E3

    Select S3:X3, copy down as many rows as there are sets of numbers

    Put in Z1: '00 (include the leading apostrophe)
    Put in AA1: =COUNTIF($S$3:$X$6,Z1)
    Select Z1:AA1, copy down to AA100

    In the matrix, we have the 2 axes
    In H2:Q2 are the numbers: 0,1,2,... 9
    In G3:G12 are the numbers: 0,1,2,... 9

    Put in H3: =INDEX($AA:$AA,MATCH(H$2&$G3,$Z:$Z,0))
    Copy across to Q3, fill down to Q12 to populate the grid

    Now to colour the internals of the matrix using conditional formatting

    Select H3:Q12
    Click Format > Conditional Formatting
    Under condition 1, make it as:
    Formula is: =ROWS($A$1:A1)<=COLUMNS($A$1:A1)
    Format > Patterns tab > Black > OK
    Click OK at the main dialog
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am trying to count the number of matched pairs by rows of data and
    > place this into a chart. Please see the screen shot example and manual
    > solution.
    >
    > With the data sets:
    > 1-2-3-4
    > 1-3-4-5
    > 2-3-4-6
    > 3-4-5-6
    >
    > I want to fill out the chart to find the number of times say 1&2 occur
    > in the same set and 1&3, 1&4, 2&3, 2&4, etc. The formula would be
    > filled into the result matrix.
    >
    > Thanks for your help!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: pairs.jpg |
    > |Download: http://www.excelforum.com/attachment.php?postid=3725 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




  67. #67
    Max
    Guest

    Re: Counting Match Pairs In Rows

    Oops, correction to formula in line:
    > Put in AA1: =COUNTIF($S$3:$X$6,Z1)


    Put in AA1: =COUNTIF(S:X,Z1)
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  68. #68
    Max
    Guest

    Re: Counting Match Pairs In Rows

    You're welcome ! Glad to hear that you found a solution to your problem,
    and thanks for sharing it with us. Good luck with the game <g> !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "bmb2200" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks so much for your solution. I countinued to try and solve my
    > issue and came up with another method. Both seem to have their pros
    > and cons.
    >
    > In my solution, I made another matrix that counts which numbers come up
    > in each data set. Then I did a sumproduct for each pair. See the
    > attached zip spreadsheet.
    >
    > Thanks again!
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: matching pairs.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3732 |
    > +-------------------------------------------------------------------+
    >
    > --
    > bmb2200
    > ------------------------------------------------------------------------
    > bmb2200's Profile:

    http://www.excelforum.com/member.php...o&userid=26560
    > View this thread: http://www.excelforum.com/showthread...hreadid=398319
    >




+ 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