Google-sheets – Google Sheets Arrayformula on both horizontal & vertical cells

google sheetsgoogle-sheets-arrayformula

In a sheet, I make calculations horizontally, however I can't build the arrayformula to expand calculation vertically on each row.
See the following sheet:

https://docs.google.com/spreadsheets/d/1FbeoKhiJ3jqYXqfIgAK_tHXPZ_Z1Xrm33ulu9gomXuE/edit#gid=16063565

enter image description here

Select the tab "arrayformula", and point to the formula in column F

=COUNTA(B3:E3)

How can I apply arrayformula so it can expand to all the rows?

Best Answer

=ARRAYFORMULA(IF(LEN(A3:A), 
 MMULT(IFERROR(LEN(B3:E)/LEN(B3:E), 0), TRANSPOSE(COLUMN(B2:E2)^0)), ))

0