Mussé Redi
Mussé Redi

Reputation: 945

Sum of row values in Google Spreadsheets

I'm new to Google Sreadsheets syntax, so forgive me if this sounds too trivial. :)

I want to sum up the row values of certain columns in my Google Spreadsheets sheet into a new column.

I'm looking for the right command to do this.

Minimal Working Example

     | Column A | Column B | Column C | Column D | Sum B + D |
     |----------|----------|----------|----------|-----------|
Row 1| a1       | b1       | c1       | d1       | b1 + d1   |
Row 2| a2       | b2       | c2       | d2       | b2 + d2   |
Row 3| a3       | b3       | c3       | d3       | b3 + d3   |

I want to construct the last column (Sum B + D) with a spreadsheet formula.

Upvotes: 0

Views: 5623

Answers (2)

Wicket
Wicket

Reputation: 38180

In cell E1 add one of the following formulas

=B1 + D1

or

=ADD(B1,D1)

or

=SUM(B1,D1)

Note: The argument separator could be ; (semicolon) instead of , (comma). It depends on the regional setting being used.

Then fill down as necessary.

If you want to avoid to have to do fill down then use the following formula

=ArrayFormula(B1:B3 + D1:D3)

Upvotes: 3

HedgePig
HedgePig

Reputation: 468

You could use the following if you wnat to sum every row in columns A, D and E

=SUM(A:A,D:D,E:E)

or this if you just want to sum, say, the first 15 rows

=SUM(A1:A15,D1:D15,E1:E15)

Basically SUM can take more than one range parameter!

It may not be what you need right now but SUMIFS are also very useful. This allows you to sum one range based on one or more conditions in other ranges.

Upvotes: -2

Related Questions