In Google Sheets, I have the following data:
| A | B | C | ... | N | TOTALS |
1 | 123| 425| 324| ... | 234| =SUM(A1:N1) |
2 | 123| 425| 324| ... | 234| =SUM(A2:N2) |
3 | 123| 425| 324| ... | 234| =SUM(A3:N3) |
How can I create the TOTALS
column using ARRAYFORMULA?
ARRAYFORMULA(SUM(A1:C99))
will give a single number, the sum of all the cells — that’s not what I want.
Best Answer
Use the following formula to do that.
Formula
Explained
The
ARRAYFORMULA
is meant to return the complete range, as set by theCOLUMN
formula. The^0 (power of zero)
will always return 1. Therefore each result is multiplied by 1 (yielding the same value) and summed.Example
I've created an example file for you: SUM OVER ROWS