Home > Software engineering >  How can I sum a row that keeps adding columns?
How can I sum a row that keeps adding columns?

Time:08-31

I know how to sum a column that keeps adding rows e.g. =SUM(b$2:b). But I can't figure out how to do the same for rows that keep adding columns. Also, (not sure if this is important, but) I like to add columns on the left, so the newest column is always F, and the older columns keep going down the alphabet.

CodePudding user response:

for column:

=SUM(B2:B)

for row:

=SUM(B2:2)

CodePudding user response:

If you just want to reference a row: see Tom Sharpe's answer here (see the 3rd formula): In Google Sheets how to reference infinite rows in column?

If you want to insert rows at the left, we can use the INDIRECT Function to fix the starting cell while the ending cell is a relative reference. Here's the formula: (This assumes that the formula is at the right of F)

=SUM(INDIRECT("F1"):F1)

As you add new columns, the F1 reference will adjust to G1, H1 and so on, but the starting cell will be fixed to F1.

If the Formula will be at the left of F, then we can just write:

=SUM(F1:1)
  • Related