Google-sheets – Apply a formula to each cell in column before computing a sum of the cells

formulasgoogle sheetsgoogle-sheets-arrayformula

How could I apply a formula to each cell in a column before computing a sum of the cells in Google spreadsheet?

In other words, I have a column of cells with numbers. And what I want is to iterate over each row in the column (i.e. each cell), apply a formula to the number in the cell and get a result of the formula. Then I want to sum all of those results.

And all of this I would like to perform in one cell (i.e. in one query).

Best Answer

=SUM(ARRAYFORMULA((B2:B26-$B$1)^2))/A1


=SUM(ARRAYFORMULA(A1:A4*(SUM(2, 3))))