+ Reply to Thread
Results 1 to 13 of 13

identify most common combination that gets to a particular value

  1. #1
    Registered User
    Join Date
    12-29-2011
    Location
    london
    MS-Off Ver
    Excel 2019 (MAC)
    Posts
    13

    Question identify most common combination that gets to a particular value

    I have a data sheet with 20 columns across 1000 lines.

    The last column has various values in it and I am interested in, lets say value 'x'. Is there a way I can identify what are the most recurring value combinations in columns 1 - 19 that gave the highest number of the value 'x'?

    I hope that makes sense. Grateful for any input.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: identify most common combination that gets to a particular value

    The way I read what your asking, column 20 holds the 'x' you want to search for in columns 1 - 19.

    In U1 >> =COUNTIF(A1:S1,T1) >> That will count how many time 'x' shows up in the row, but if you want to Sum those 'x' >> =SUMIF(A1:S1,T1) >> in V1
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    12-29-2011
    Location
    london
    MS-Off Ver
    Excel 2019 (MAC)
    Posts
    13

    Re: identify most common combination that gets to a particular value

    Thank you. Not quite and apologies for not being clear.

    Columns 1 - 19 will have different values in diff. format. So lets just say (for example):

    Column 1 = Dates
    Columns 2 = Animal names
    Column 3 = Month names
    Column 4 = Latin words
    etc etc

    What I am trying to find out is what combination across columns 1 - 19 brings up the value 'x' in column 20 the most. Hope that makes better sense.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: identify most common combination that gets to a particular value

    How about a sample file with some manually entered answers you expect? The sample file does not have to be big, just big enough to give us a good picture with different scenarios.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: identify most common combination that gets to a particular value

    You could calculate the correlation of column 2 = "dog" and column 20 = "x"
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    12-29-2011
    Location
    london
    MS-Off Ver
    Excel 2019 (MAC)
    Posts
    13

    Re: identify most common combination that gets to a particular value

    Ok so I have attached a very rough sample of the data. Column V in this case is the magic number and I am trying to establish is what combination across all the columns before column V brings up the number '1' the most.

    In the data provided there may not actually be any pattern as such however my actual data is huge and there are likely to be patterns in the data.

    Thank you
    Attached Files Attached Files

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: identify most common combination that gets to a particular value

    Sorry, but I don't quite see what you seek here. Can you give some insight into why for instance row 5 has a magic number of 2 and row 12 has a magic number of 5?

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: identify most common combination that gets to a particular value

    For example,

    R
    V
    W
    X
    Y
    Z
    1
    country
    Magic Number
    country
    correl
    2
    FR
    1
    FR
    -0.15
    Y2: =CORREL(--($R$2:$R$12 = X2), --($V$2:$V$12 = "1"))
    3
    IRE
    1
    IRE
    0.31
    4
    IRE
    1
    GB
    -0.29
    5
    FR
    2
    6
    IRE
    3
    7
    IRE
    1
    8
    IRE
    0
    9
    GB
    4
    10
    IRE
    5
    11
    IRE
    1
    12
    FR
    5


    A 1 is more likely to come from Ireland than France or Great Britain.
    Last edited by shg; 11-24-2018 at 06:17 PM.

  9. #9
    Registered User
    Join Date
    12-29-2011
    Location
    london
    MS-Off Ver
    Excel 2019 (MAC)
    Posts
    13

    Re: identify most common combination that gets to a particular value

    Quote Originally Posted by jeffreybrown View Post
    Sorry, but I don't quite see what you seek here. Can you give some insight into why for instance row 5 has a magic number of 2 and row 12 has a magic number of 5?

    The example I had provided was random numbers/data inserted. There was no particular logic behind the sample data.

  10. #10
    Registered User
    Join Date
    12-29-2011
    Location
    london
    MS-Off Ver
    Excel 2019 (MAC)
    Posts
    13

    Re: identify most common combination that gets to a particular value

    Quote Originally Posted by shg View Post
    For example,

    R
    V
    W
    X
    Y
    Z
    1
    country
    Magic Number
    country
    correl
    2
    FR
    1
    FR
    -0.15
    Y2: =CORREL(--($R$2:$R$12 = X2), --($V$2:$V$12 = "1"))
    3
    IRE
    1
    IRE
    0.31
    4
    IRE
    1
    GB
    -0.29
    5
    FR
    2
    6
    IRE
    3
    7
    IRE
    1
    8
    IRE
    0
    9
    GB
    4
    10
    IRE
    5
    11
    IRE
    1
    12
    FR
    5


    A 1 is more likely to come from Ireland than France or Great Britain.
    Thank you. So this would be done with each column as opposed to a couple of columns combined? Could you combine correlation of 2 columns to assess outcome. in other words, which two column combinations are most likely to give you the magic number of '1' ?

    Thank you

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: identify most common combination that gets to a particular value

    So this would be done with each column as opposed to a couple of columns combined?
    Perhaps there is a way, but the numbers of combinations of 20 columns explodes the problem.

    There's no need to quote my posts back to me -- it's just clutter.

  12. #12
    Registered User
    Join Date
    12-29-2011
    Location
    london
    MS-Off Ver
    Excel 2019 (MAC)
    Posts
    13
    And that there is the problem..too many combinations..

    Even if you could check two columns combination - how would you do that please? Thank you

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: identify most common combination that gets to a particular value

    Q
    R
    V
    W
    X
    Y
    Z
    AA
    1
    Month country
    Magic Number
    country
    month
    correl
    2
    Jan FR
    1
    FR Jan
    0.04
    Z2: {=CORREL(($R$2:$R$12 = X2) * ($Q$2:$Q$12 = Y2), --($V$2:$V$12 = "1"))}
    3
    Jan IRE
    1
    IRE Jan
    0.52
    4
    Feb IRE
    1
    GB Jan
    #DIV/0!
    5
    Nov FR
    2
    6
    Nov IRE
    3
    7
    Dec IRE
    1
    8
    Nov IRE
    0
    9
    Jun GB
    4
    10
    Dec IRE
    5
    11
    Jan IRE
    1
    12
    Jan FR
    5

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Find the most common combination of 3
    By SAE.01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2020, 12:04 PM
  2. Replies: 1
    Last Post: 09-26-2014, 04:47 PM
  3. Identify Common Words (and combination of)
    By ItsMeH in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 05:53 PM
  4. Most common combination - is this possible
    By LIJ in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-12-2012, 03:11 PM
  5. Identify reoccurring in any combination of value in multiple columns
    By zoneone73 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-14-2012, 03:23 PM
  6. How to identify common #s amongst columns
    By Dynamo418 in forum Excel General
    Replies: 3
    Last Post: 07-07-2010, 08:44 PM
  7. How to Identify Values in Common Between 2 cells
    By ahofeld in forum Excel General
    Replies: 1
    Last Post: 07-21-2006, 02:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1