I try to COUNTIF(B2:Q2;\">5\")
for each row and return the result for each row in column A
but I clearly fail on using ARRAYFORMULA
In addition to Max's solution, I believe it should be possible to use COUNTIF(). See if this works
=ARRAYFORMULA(COUNTIF(IF(B2:Q>5,ROW(B2:B)), ROW(B2:B)))
Sample File
=ARRAYFORMULA(MMULT(FILTER(--(B2:Q>5),B2:B<>""),TRANSPOSE(COLUMN(B2:Q)^0)))
mmult
is effective, but slow formula. I used filter
to limit the number of calculations.
Edit. Here's another formula to do the same:
=ArrayFormula(LEN(SUBSTITUTE(SUBSTITUTE(TRANSPOSE(QUERY(TRANSPOSE(FILTER(--(B2:Q>5),B2:B<>"")),,100500)),"0", "")," ","")))
Looks clunky but should work faster (not tested).