arrayformula sum in Google spreadsheet

Another option:

=ArrayFormula(SUMIF(IF(COLUMN(A1:H1),ROW(A1:A1000)),ROW(A1:A1000),A1:H1000))

Of the two answers that work, Jacob Jan Tuinstra and AdamL, Jacob gives a better answer. Jacob's runs faster and is easier to remember.

However, why use crazy formulas when it is much easier to use Google Sheets to the fullest?

=ARRAYFORMULA(A2:A+B2:B+C2:C+D2:D+E2:E+F2:F+G2:G+H2:H) 

In the foregoing formula, you can use named ranges instead of the ranges by reference.

=ARRAYFORMULA(range1+range2+range3+range4+range5+range6+range7+range8) 

As well, you can sum across rows that span sheets rather than being stuck working with columns within the same sheet.

To fix the formula to block returning zeros for blank rows, use this:

=arrayFormula(if(isNumber(A2:A),A2:A+B2:B+C2:C+D2:D+E2:E+F2:F,G2:G,H2:H))

See: See Ahab's answer on Google Forums

For a cool sum accumulation formula, see Otávio Alves Ribeiro's answer on Google Forums


with new functions in google sheets (since 20 Sep, 2022) all you need is:

=BYROW(A:H; LAMBDA(x; SUM(x)))

enter image description here


This is what you are looking for:

=MMULT(A1:H1000,TRANSPOSE(ARRAYFORMULA(COLUMN(A1:H1000)^0)))

See this answer on Web Application I gave: https://webapps.stackexchange.com/a/53419/29140

Note: tried it on the new Google Spreadsheet, without succes.