Hi Larry ,
Here goes :
1. The lowest row in your helper columns will have 1s in the four helper columns which correspond to your data columns.
- Suppose your data columns are F , G , H and I.
- Suppose the starting row for Game 1 is the worksheet row numbered 2700.
- Suppose the helper columns are BA , BB , BC , BD and BE.
Thus the cells BA2700 , BB2700 , BC2700 and BD2700 will all have 1 in them.
2. Suppose the generated numbers are in column C.
3. If there is no transition in the next higher row , then put 0 in C2700 , else put 1 in C2700.
4. In BE2700 , enter the following formula :
=ISODD(IFERROR(INDEX($F2700:$I2700,MATCH($C2700,$BA2700:$BD2700,0)),1))
Copy this formula to BE2699.
5. In C2699 , enter the following formula :
=SUMPRODUCT((BA2699:BD2699<>1)*(BA2698:BD2698=1),BA2699:BD2699)
6. In BA2699 , enter the following formula :
=IF(F2699=F2700,BA2700+1,1)
Copy this formula across to BB2699 through BD2699.
7. Copy the formulae in C2699 , BA2699 through BE2699 upwards as far as you want.
8. Suppose you copy all of the formulae till worksheet row number 7.
Select the range C7:C2700 ; click on Conditional Formatting , and enter the following formula for the RED colour :
=$BE7
Enter the following formula for GREEN colour :
=NOT($BE7)
Try all of the above and let me know if it works.
Narayan