Google-sheets – Use arrayformula to count columns in rows

google sheets

I want to count the number of columns containing entries in them per row.

I used the formula :

=ArrayFormula(countif($H$4:$4,"<"&$A$4:$A)/count($H$4:$4))

Best Answer

this might work...

=ARRAYFORMULA(IF(A4:A="",,MMULT(N(OFFSET(H4,,,ROWS(H4:H),COLUMNS(H4:4))<>""),SEQUENCE(COLUMNS(H4:4),1,1,0))))