+ Reply to Thread
Results 1 to 20 of 20

analysis of name combinations

  1. #1
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    analysis of name combinations

    I have within each cell a group of names who are members of a club. Each cell is that's clubs combination of members.

    so I'm analyzing the relationships between club members in terms of frequency.

    while I know how to count the number of times a name appears as a member of a club, what I can't figure out is how to come up with frequency of 2 or 3 names appearing together across the clubs I'm analyzing.

    taking this further - if there are 100 names, and I only care about the relationships between 10 of those names, I'd like to be able to see how many times in each cell there are names that appear together. does that make sense? perhaps my attached sheet with notes will help.

    many thanks in advance, I have puzzled over this for some time.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: analysis of name combinations

    Hi billybob,

    I'd make a table of your problem putting the words you were looking for above and to the right of your long list of members. See the attached where I pull out the individual words above the long lists and do a count of if those are in that string or not. Hope this helps. If you don't understand it keep asking.
    Find Words in Strings Table.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: analysis of name combinations

    Please Login or Register  to view this content.
    See attached using a matrix (Sheet "Matrix") to find matches: I haven't checked every value!
    Attached Files Attached Files
    Last edited by JohnTopley; 12-24-2021 at 12:59 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: analysis of name combinations

    this is the same question !!!!
    https://www.excelforum.com/excel-for...ml#post5610933

    addition to the macro of JohnTopley
    number of duos in sheets "duos"
    Attached Files Attached Files
    Last edited by bsalv; 12-24-2021 at 10:36 AM.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  5. #5
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    the issue i'm having is i'm not seeing what I need to see - meaning - I see all the "1's" in the columns, but what is that telling me? that there's one occurrence for everything in the table? sorry if I'm not understanding this, but my vision was to try to have an output of the frequency of pairing of names from my 10 name list.but not sure what this is telling me...

  6. #6
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    so for example, if put the name "octagon" in multiple cells where "viking" exists, I was thinking the about should show me the amount of occurrences where they are in a club together. does that make sense? this is just showing me a "1" that they existed together, but not the frequency.

  7. #7
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    also it is not the same as the permutation problem you pointed to. in the permutation I was looking to see the number of permutations for a given 3 or 4 name set. In this problem, I'm looking for frequency of occurrences - sorry - just very stuck here.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: analysis of name combinations

    I have updated code/file on original post.

    If you change in VBA

    Set ws1 = Worksheets("Data")

    to

    Set ws1 = Worksheets("Test")

    to see if this gives expected results i.e. have I understood your requirement?

  9. #9
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: analysis of name combinations

    see attachment
    Adage - Deerfield has 6 meetings, but they are all in 1 meeting (meeting 15)
    In sheet "Result", you see all the meetings between you fixed names.
    The pivottable counts the number of meetings in total and the number of unique meetings.
    Attached Files Attached Files
    Last edited by bsalv; 12-24-2021 at 01:23 PM.

  10. #10
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    this is almost there - but the issue is there should be only 1 count for any particular meeting of duos. Meaning, for meeting 15, I don't care how many times the name is in there, I just care that in meeting 15 there was a Janus and there was a [whoever else]. So the count of 6 isn't right, as it should only be 1x. What I want to do is find out across meetings (so the rows) .

    It's very interesting how you set this up. I wouldn't have thought to do it that way. Are you able to tweak this so it's doing what we want it to do? are you able to set it up so I can easily change the inputs (names) that I want analyzed? also - I do not think it needs a table with the "Full name" b/c all anyone with the first name "Janus" are all the same. I care about how many times Janus appears in a club with the list of names I'm analyzing.

    I"m sorry if I'm not explaining this well. it's a bit complex, but love what you have done so far. let me know if you need more clarity on the above.

  11. #11
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    this is also an interesting way of doing it. So the outputs are showing the number of times a meeting across the data set? I need to test this a little.

    Is there a way to have an output sheet that shows the occurences above 2x ? that happens and what the number of occurrences are for the occurrences and pairs that are happening a lot?

    I am not a heavy user of macros. Why would I need to change those items in VBA? sorry - just confused.

    let me know on both of the above and I really appreciate the work on this.

  12. #12
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    I've uploaded an adjusted seat, so you can see what I'm trying to do.

    I'm trying to get for example Cell B3 to tell me how many times Janus has met Cormorant in the data set. The trick part being that Janus has different last names and Cormorant may have different last names. They can meet only once per cell even if you see different versions of the name in there more than once.

    so basically I'm trying to simplify and have an output that says in cell B3 "4" or "3" to tell me the total number of occurrences.

    let me know if that helps, my adjusted sheet uploaded, but I clearly can't get it working right ..
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: analysis of name combinations

    there are 2 defined names
    * MyNames in C3 = 1 cell (!), all the keywords separated by a "," (adaptable)
    * MyMeetings in C5:C19 = a range, every cell is a meeting, all the firms are separated by a ";" (adaptable)
    You already used defined names, so you need no explanation (i hope).

    In "result" the macro writes the meetingnumber and a combination of 2 keywords.
    The combination is alphabetic, thus the 1st keyword becomes before the 2nd, in the alphabet.

    The pivottable summaries this data.
    The number of meetings is in descending order and >=2 (settings in the pivottable itself, not in VBA)

    Trio's can also be screened with a slightly adapted macro with its own table and pivottable.

    If you want to try out something, fill both defined names with your data and run the macro.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    You are an excel master. I do not know how you figured this out.

    this is exactly what I need. I may want to evolve this more. would you mind if I worked with this a bit before I closed the thread? I'm going to test a few things with new data - more to come.

  15. #15
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    uploading an adjusted version where I changed a bunch of info - and of course affected the sheet's functioning.

    I changed name of tabs, cleaned up how the data looks and added more data in column C (added two new names to the list separated by commas as a test) and more in Column E.

    1. can you get this working with what I've done?
    2. how can I make sure the data set expands beyond or E15 as that's where I'll be cutting nad pasting new sets of data. when I pasted in a data set with more rows, it doesn't seem to capture the additional data (trying to get this set so I can just cut and paste new data in going forward)
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    I've made some progress on this - how can I adjust the range of meetings that is being analyzed? (I want to paste new data in to test it but it won't pick up data beyond the row from your last sheet)

  17. #17
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: analysis of name combinations

    modify the range for "MyMeetings", now C5:C19, if it's more suitable make it in a table for example A2:A20 ....
    Attached Files Attached Files
    Last edited by bsalv; 12-24-2021 at 07:28 PM.

  18. #18
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Thumbs up Re: analysis of name combinations

    this is fantastic. Better than I hoped.

    I consider this solved, BUT if you are up for it, you mentioned possibly making it trios vs. duos? it is not required for what I need, but I'd be interested to see it if you are amenable.

    either way thank you again.

  19. #19
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: analysis of name combinations

    look in #17, up to trio, quads, quintets
    A small detail changed in sorting the table of keywords
    Attached Files Attached Files
    Last edited by bsalv; 12-25-2021 at 11:16 AM.

  20. #20
    Registered User
    Join Date
    12-06-2021
    Location
    Boston
    MS-Off Ver
    Latest
    Posts
    18

    Re: analysis of name combinations

    thank you so much. excellent and would have taken me about 3 years if ever to get there. I am going to work with this for a bit over the next week and have a great holiday!

+ 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. Replies: 0
    Last Post: 03-20-2021, 01:13 AM
  2. Replies: 1
    Last Post: 11-09-2018, 01:16 AM
  3. Replies: 1
    Last Post: 08-28-2014, 05:41 PM
  4. Replies: 1
    Last Post: 03-06-2014, 11:00 AM
  5. Data Analysis- advanced pivot functions for employee analysis
    By Dsankie in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-10-2013, 12:30 AM
  6. Finding possible combinations & listing the wanted combinations
    By Zoke in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 07-16-2012, 03:41 PM
  7. [SOLVED] Analysis ToolPak installed but no Data Analysis option
    By Eric Stephens in forum Excel General
    Replies: 3
    Last Post: 02-02-2005, 06:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1