+ Reply to Thread
Results 1 to 5 of 5

Calculate highest occurence of 2 pairs between a range

  1. #1
    Valued Forum Contributor sans's Avatar
    Join Date
    10-19-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    550

    Calculate highest occurence of 2 pairs between a range

    Hello,

    I have been trying to find a way to do a certain calculation in excel but with no luck so far. I just simply can't figure it out.

    The names in the table are irrelevant. Please have a look at the results column in the attached workbook as it is clear what I'd like to do.

    If there is an easy way to get the highest percentage, it would be simply amazing.

    Thank you

    Sans
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Calculate highest occurence of 2 pairs between a range

    I am not sure what you mean by which two pairs give highest percentage?

    What are the expected results and based on what?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Valued Forum Contributor sans's Avatar
    Join Date
    10-19-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    550

    Re: Calculate highest occurence of 2 pairs between a range

    Hi NBVC,
    thank you for your reply.

    Basically, if I was going to do this manually I would need to do all possible combinations of two pairs, to see which two pairs give the highest percentage. For example, I would need to start with


    =IF(OR(AND(O7=CHAR(252),P7=CHAR(252)),AND(Q7=CHAR(252),R7=CHAR(252))),CHAR(252),CHAR(251))

    then

    =IF(OR(AND(O7=CHAR(252),P7=CHAR(252)),AND(Q7=CHAR(252),S7=CHAR(252))),CHAR(252),CHAR(251))

    then

    =IF(OR(AND(O7=CHAR(252),P7=CHAR(252)),AND(Q7=CHAR(252),T7=CHAR(252))),CHAR(252),CHAR(251))

    then

    =IF(OR(AND(O7=CHAR(252),P7=CHAR(252)),AND(Q7=CHAR(252),U7=CHAR(252))),CHAR(252),CHAR(251))


    then

    =IF(OR(AND(O7=CHAR(252),P7=CHAR(252)),AND(Q7=CHAR(252),V7=CHAR(252))),CHAR(252),CHAR(251))

    until I reach

    =IF(OR(AND(W7=CHAR(252),X7=CHAR(252)),AND(Y7=CHAR(252),Z7=CHAR(252))),CHAR(252),CHAR(251))

    Is it possible to skip the above and use one formula that can show which two pairs would give the highest percentage as in the workbook?

    Thank you for your help,
    Sans

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Calculate highest occurence of 2 pairs between a range

    If I understand correctly, I think you will need to use either some massive formulas or it will more likely need VBA....

  5. #5
    Valued Forum Contributor sans's Avatar
    Join Date
    10-19-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    550

    Re: Calculate highest occurence of 2 pairs between a range

    Yes, I'll probably need to do it manually. I was just wondering if there was a simpler method.

    Thank you for replying
    Sans

+ 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