Sum of Rows

How to use the Sum function in Excel or Google Spreadsheet to perform a sum of numbers and end with the cell above the location of the total

Sum of Rows in Excel

A B
1 Day Sales Total
2 Monday $1,325.47
3 Tuesday $1,502.69
4 Wednesday $1,452.14
5 Thursday $1,398.85
6 Total $5,679.15

=SUM(B2:OFFSET(B6,-1,0))

Excel Source: SUM OFFSET Formula

 

Sum of Rows in Google Spreadsheet

A B
1 Day Sales Total
2 Monday $1,325.47
3 Tuesday $1,502.69
4 Wednesday $1,452.14
5 Thursday $1,398.85
6 Total $5,679.15

=SUM(INDIRECT(“B2:”&ADDRESS(ROW()-1,COLUMN(),4)))

Google Spreadsheet Source: SUM OFFSET Formula