I would like to calculate the scalar product of row B1:1 with row B2:2, B3:3, ..., and put the result in column A. My data can have empty cells and is growing both in columns and rows, therefore I would like to find a solution that does not require applying the formula manually to each new data entry.
My current solution mathematically does what I want. However, whenever there are more rows than columns in the sheet, the result is only calculated for the number of columns and the remaining rows remain empty.
=ARRAYFORMULA(TRANSPOSE(MMULT(N(B1:1), N(TRANSPOSE(INDIRECT(CELL("address", B2)&":"&COLUMNS(2:2)))))))
Adding empty columns works for now, but how can I solve this without having to add extra columns all the time?


