=SUMPRODUCT((INDIRECT("C"&(9880+ROW(A1)-(COLUMN(A1)-1)*110)&":C"&(9989+ROW(A1)))=1)*(INDIRECT("D"&(9880+ROW(A1)-(COLUMN(A1)-1)*110)&":D"&(9989+ROW(A1)))=2))