=SUMPRODUCT(SUBTOTAL(3,OFFSET(Cohort!$L$13:$L$2002,ROW(Cohort!$L$13:$L$2002)-MIN(ROW(Cohort!$L$13:$L$2002)),,1))*(Cohort!$L$13:$L$2002>5<21))
It works for =SUMPRODUCT(SUBTOTAL(3,OFFSET(Cohort!$L$13:$L$2002,ROW(Cohort!$L$13:$L$2002)-MIN(ROW(Cohort!$L$13:$L$2002)),,1))*(Cohort!$L$13:$L$2002<=5))...