Matching one row with another row of same column iteratively and getting sum at bottom of the column?

genetist

Board Regular
Joined
Mar 29, 2013
Messages
75
Office Version
  1. 2016
Platform
  1. Windows
Dear All
good morning

I have data like this
IND M1 M2 M3 M4 M5
1 A/A G/G C/C T/T T/T
2 T/T C/C C/C G/G G/G
3 C/C T/T C/C C/C C/C
4 G/G T/T T/T G/C A/A
5 G/G T/T G/G C/T A/A


Step1: First i would like to give zero if any M column (2nd Row) from M1 to M5 contains different letters like A/T,A/G,A/C,T/A,T/G,T/C,G/A,G/T,G/C,C/A,C/T,C/G
Step3: MATCHING SINGLE ROW WITH ALL THE ROWS AND LIKE THIS ALL THE ROWS WITH REMAINING ROWS for example Matching B3 with B4,B5,B6,B7 and then matching B4 with B3,B5,B6,B7 and I will do same thing with B5,6 and B7 if matches then 0 otherwise 1 and finally I want to sum all the non matches i.e.1's. Now i would like to repeat same rocedure to columns C,D,E,F
Step3: i would like to get sum of all the one's at bottom of each column from B to F


Here i am sharing example for better understanding of my issue.


https://www.dropbox.com/s/iq7m5a2e4e...0PIC.xlsx?dl=0


Here i tried normal if conditions and i can match one row with other and it is taking lot of time but i want to compare all at one time may be through macro or very good formula. I am requesting you all to help and any help in this regard is highly appreciable.
Thanks in advance
Genetist
 
Sorry, I am still not following.
The example for the calculation that you have provided seems to be the same as column B from post #4 and the formula provided there still produces 18 for that column.
The previous formula also produces the expected results here for columns C and F.

What I think I need is the steps for columns D & E as those results appear to be different. As well as providing the list of 0/1 values, I need to know how you determine each of those 0/1 values.
Dear Peter_SSs
Good Morning
Thanks for your time :)
0 means if any two comparisons matched (i.e. A/A with A/A then zero ) and different letters i.e. one with A/A and 2nd with A/T (2nd letter should be different) or any of two comparisons have text called MISSING then ZERO otherwise 1 then i will sum all the ones at bottom finally for me the column more sum is best one.
Thanking you very much hope i explained better
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I think that I get what you are trying to do, but so far have not been able to come up with a successful formula. :(
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top