c14
=LET(x,MMULT(SEQUENCE(,16,1,0),IF(IFERROR(FIND(SEQUENCE(1,10,0,1),SMALL(--CHOOSE({1,2},B3:B10,D3:D10),SEQUENCE(COUNTA(CHOOSE({1,2},B3:B10,D3:D10))))),0)>1,1,IFERROR(FIND(SEQUENCE(1,10,0,1),SMALL(--CHOOSE({1,2},B3:B10,D3:D10),SEQUENCE(COUNTA(CHOOSE({1,2},B3:B10,D3:D10))))),0))),
XMATCH(MAX(x),x)-1)
c15=LET(x,MMULT(SEQUENCE(,16,1,0),IF(IFERROR(FIND(SEQUENCE(1,10,0,1),SMALL(--CHOOSE({1,2},B3:B10,D3:D10),SEQUENCE(COUNTA(CHOOSE({1,2},B3:B10,D3:D10))))),0)>1,1,IFERROR(FIND(SEQUENCE(1,10,0,1),SMALL(--CHOOSE({1,2},B3:B10,D3:D10),SEQUENCE(COUNTA(CHOOSE({1,2},B3:B10,D3:D10))))),0))),
MAX(x))
|