Forum Discussion
Check cells for matching data and assigning values based on this
When you insert a range of rows/columns, excel wants to know what it has to do with them (ie insert a formula).
If I'm right and I understood your datas, Group 1 will always score 1 point (compared to no other groups). Group 2 will compare with 1, and let's say Group N is compared to all 1 to N-1 Groups.
So you just have to use =COUNTIF() to specify what calc it has to do with that cells.
See in the attachment what I mean.
You have to set an IF condition counting the previous 3 cells, asking if the first, the second or the third value is also in that cells. Locking with $ the first cell but not the last allows you to apply this check to all the previous 3 block cells.
=IF(OR(COUNTIF($A$2:A$4;B2)>0;COUNTIF($A$2:A$4;B3)>0;COUNTIF($A$2:A$4;B4)>0);0;IF(COUNTA(B2:B4)<3;0;1))
In the last counta function I checked if you already inserted 3 colours or not; if not, it won't start comparing cells, assigning 0. When there will be 3 colours in the B2 B3 B4 cells, it will compare with A2 A3 A4 (if you don't want this, delete the if(counta) function and insert 1 instead). Using A$4 will allow you to copypaste the formula with self adjusting to columns ZZ$4 (example), leaving locked to the Group 1 which starts in $A$2.