+ Reply to Thread
Results 1 to 11 of 11

Calculating Agreement between various columns into a Matrix

  1. #1
    Registered User
    Join Date
    06-20-2016
    Location
    Houston
    MS-Off Ver
    2010
    Posts
    73

    Calculating Agreement between various columns into a Matrix

    Hello, I've been in this forum once before, but am still quite a novice at excel (compared to most folks here), so I'm hoping my questions make sense and can lead to some progress with my work.

    I'm working on collating different Greek editions of the New Testament (18 editions to be exact) -- "collating" means I am finding points of variation between those texts, and marking down which editions have which 'readings'. I'm using excel to track them at each point of variation, and then compare them against each other.

    Variants1.PNG

    In the image above I'm showing an brief example. This would be the book of John, and I numbered each variant as "variant 1", etc. For each variant, I gave all the readings which that variant has a number (1, 2, etc.), then for each edition I marked the reading it used in its text.

    So, here's what I'm trying to do with this:

    Matrix1.PNG

    I want to make a matrix showing the percentage of agreement between each PAIR of editions. Since there are 18 editions used in this, that would make 324 pairs. It seems to me there are two steps in the calculation: 1) calculating the agreement between the two on every variant, and 2) dividing the # of agreements over the total # of variants. What I'm trying to figure out is - how to calculate the agreement between EACH EDITION on every variant (every row). Then, having all of those agreements added up down the entire sheet, and inserted into the matrix spreadsheet. Then have them divided by the total # of variants to get the percentage. To imagine doing this for every single variant 324 times seems far too tedious, and I'm hoping there is some easier way in excel to go about it.

    I'm not sure if that was 100% clear, but if you're unsure what I mean let me know and I'll try to clarify. This is a tough project, as I have to examine 18 books at once looking for any minute difference, and to add the difficulty of excel to it just makes my head want to explode. But I'm hoping that someone out there is able to help me out!

    Thank you in advance.
    Last edited by nitro22888; 10-11-2019 at 10:40 PM.

  2. #2
    Registered User
    Join Date
    06-20-2016
    Location
    Houston
    MS-Off Ver
    2010
    Posts
    73

    Re: Calculating Agreement between various columns into a Matrix

    Sorry that I made no sense.

  3. #3
    Registered User
    Join Date
    06-20-2016
    Location
    Houston
    MS-Off Ver
    2010
    Posts
    73

    Re: Calculating Agreement between various columns into a Matrix

    Should I post this somewhere else? If anyone can help me with that I'd be grateful.

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,824

    Re: Calculating Agreement between various columns into a Matrix

    If I understand correctly, this would work:

    For your second grid, put that underneath your current grid (in this example, your headers would start in row 16). In cell C17, enter this formula:

    =SUMPRODUCT(--(INDIRECT(ADDRESS(5,MATCH($B17,$B$4:$T$4,0)+1)):INDIRECT(ADDRESS(14,MATCH($B17,$B$4:$T$4,0)+1))=INDIRECT(ADDRESS(5,MATCH(C$16,$B$4:$T$4,0)+1)):INDIRECT(ADDRESS(14,MATCH(C$16,$B$4:$T$4,0)+1)))/COUNTA($B$5:$B$14))

    You can then copy this down/across to all your cells in the 2nd grid.
    I'm sure this can be done much easier, but I wanted to get you something that at least worked (again, per my understanding anyway).

    See the attached for any clarification.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-20-2016
    Location
    Houston
    MS-Off Ver
    2010
    Posts
    73

    Re: Calculating Agreement between various columns into a Matrix

    Hi Greg, thanks! It looks like you understood what I wanted pretty well. And I really appreciate you giving this a try. I'm sure it took a good bit of time putting that together.

    I tried to look up the functions you were using so I could understand it, (even though I didn't understand it all completely) it seems to me what you're doing is matching the names of each group (in the example: "E1" "E2" etc.) with the same names of each column in the above chart, then adding the number of times each group equal's each other (row by row), then dividing that by the total number of variants (using the count function).

    I think that's what's going on. But as I tried to apply it to another chart by following the same formula, I ended up with errors. I'm trying to actually understand it because I will add more data to it over time, and will have to be able to adapt the formula to other information. I think my errors occurred because I used a different sheet, and cells that I was trying to reference were in other places, and somewhere I was missing something. I don't think I was referencing the information in the chart correctly.

    I used the same spreadsheet you sent and added 2 more tabs to it which contain the specific work I'm doing. Sheet2 is a direct copy of stuff I had done so far. The difference with that sheet is, it was originally designed just to calculate the difference between the Greek NT we compiled with 17 others. But after I got started, it was decided we also wanted to compare them all with each other, to see which ones cohere best with each other. So all the agreement/disagreement data on that page is only how the CHGNT itself compares with the others. Not how ALL of them compare. So I was put in a bind by this decision. All that is relevant on that page to what I'm asking is the "Reading No." columns (that is what tells us where they agree or disagree).

    I made another sheet (sheet3) which only has the "Reading No." columns filtered, in case this task just isn't possible to do on the original sheet I started with. You can tell me if it is or isn't. But if not, I can filter it like this to make it simpler. That is the sheet I was using to try and adapt your formula to, and ended up with errors.

    So, it seems what you started with is very much on the right track, but I just haven't been able to apply it beyond the example you gave. If it's not too much trouble for you, I'd be so grateful to learn or figure out how to get it that to work on more information, and where I can adapt it to more over time.

    Let me know if you can come up with anything. And either way, thank you at least for trying.
    Attached Files Attached Files
    Last edited by nitro22888; 10-14-2019 at 06:36 AM.

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,824

    Re: Calculating Agreement between various columns into a Matrix

    Not sure if this is what you wanted, but updated Sheet3. In cell E59 I entered this formula and copied it down and across:

    =SUMPRODUCT(--(INDIRECT(ADDRESS(4,MATCH($D59,$E$3:$U$3,0)+4)):INDIRECT(ADDRESS(55,MATCH($D59,$E$3:$U$3,0)+4))=INDIRECT(ADDRESS(4,MATCH(E$58,$E$3:$U$3,0)+4)):INDIRECT(ADDRESS(55,MATCH(E$58,$E$3:$U$3,0)+4)))/COUNTA($D$4:$D$55))
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-20-2016
    Location
    Houston
    MS-Off Ver
    2010
    Posts
    73

    Re: Calculating Agreement between various columns into a Matrix

    Yeah, thank you again. That looks really good. My one question about the formula is, if I add more information to it (as I will, since that's only chapter 1 -- and each chapter is of different length) will I then need to adjust the formula for more lines of data?

    I don't wanna have to use you to make the formulas for me each time I finish a section. It'd be much better if I could make the adjustments myself as I go. Is there a way you could clue me in enough on how the formula is working? Just so I knew what adjustments to make (such as: if the number of lines changed, or the cell references changed)?

    Either way, if I'm asking too much, I'll keep researching myself to understand it all. You've been a huge help so far already. (at least I know now that this sort of formula is possible!)

  8. #8
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,824

    Re: Calculating Agreement between various columns into a Matrix

    OK, so what I did is the following:

    I put most of your data (on Sheet3) in an Excel Table. This way if you add another header at the top or add another row across the bottom, the results in the bottom half will automatically change.
    When you add another column to the top, you'll just have to add that same column header to the headers across the bottom part of the sheet, and also add it to the bottom row of the sheet. You would then copy the formulas to these columns/rows.
    It will still work if you insert or delete rows at the top of your sheet.

    Let me know if this works for you.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-20-2016
    Location
    Houston
    MS-Off Ver
    2010
    Posts
    73

    Re: Calculating Agreement between various columns into a Matrix

    Greg -- that looks amazing! At first I wasn't sure how to add more lines... but then I dragged the blue box down to cover the additional rows -- and the matrix then recalculated with the additional lines included. So it looks to me like everything works just as needed! I also added an additional column to see how that works, and was able to add one with no problems (thanks to your help).

    I attached the spreadsheet with the additional rows/columns. The only further question I have left is related to the filter which was added to the top of the columns. When I saw those, I was wondering if there was a way to add a filter to the chapter column, where I can filter particular chapters out of the book, and then the matrix will calculate ONLY the data for that chapter? When I used the filter on one of the columns, it filtered the info, but didn't adjust the data in the matrix. I was curious if that was possible or not. Researching it on my own today gave me the impression it would take some further restructuring of the whole thing -- which if so, I'll forget about it.

    **On topic of the filter question -- I think what I'm gonna do is have the sheet you created (with the matrix) be at the back of the workbook, and create a front sheet which features the matrix table in the center (I will funnel the data through to the cells on the front sheet), so that I can add other average/sum data relevant to it in the same place and have it all featured at the front. And therefore -- if there is to be a filter added on the 'chapter' column -- is it possible for that filter to work through a drop-down or check-box list on the front sheet (or does it need to be on the 'chapter' cell at the head of the table on the back sheet)? Of course, if the filter itself I'm proposing cannot be implemented at all, then this additional question is irrelevant. But if the filter can be made, is there a way the filter criteria selection be done on a different sheet through a drop-down or check-box list?

    As I said, you've worked wonders with my issues on this project, and I can't be more appreciative of your help!
    Attached Files Attached Files
    Last edited by nitro22888; 10-18-2019 at 12:31 AM.

  10. #10
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,824

    Re: Calculating Agreement between various columns into a Matrix

    You're welcome - glad it works for you!
    You can expand the table to include the Chapter and verse, but you'll have to get rid of all merged cells, so you'd have to enter the same chapter/verse in each row. Regarding having the matrix work when you filter the top table, off the top of my head, I don't know a way to do that :-(

  11. #11
    Registered User
    Join Date
    06-20-2016
    Location
    Houston
    MS-Off Ver
    2010
    Posts
    73

    Re: Calculating Agreement between various columns into a Matrix

    Alright, thanks! Yeah, I actually had already been researching if I could filter with merged cells or not. But that isn't a necessity for me, so it's no big deal. What you've done is exactly what I needed. Thanks! All the best to you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Calculating invoice price from pricing matrix using INDEX/MATCH
    By UKPatriot1980 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-21-2017, 10:18 AM
  2. deleted post
    By joemac92 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-10-2015, 12:19 AM
  3. Get data from matrix and calculating on this logic
    By pedjvak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2015, 05:46 AM
  4. Replies: 2
    Last Post: 02-11-2014, 05:05 AM
  5. How do you calculate agreement between numbers in two different columns?
    By fullofshift in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-30-2013, 05:50 PM
  6. [SOLVED] Calculating Values out of a matrix setup
    By mjbusch1985 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-27-2012, 04:46 PM
  7. [SOLVED] calculating matrix values
    By Jason M in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2005, 03:25 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