AG_HIHI
AG_HIHI

Reputation: 1995

Google sheets: How to write a formula that performs a sum from column_x until previous column and apply it to the rest of the columns

I have these two columns:
enter image description here
For the next columns I would to apply this formula:

SUM[all_previous_columns]

I would like to write it once for the third column and apply it for the rest of the columns.
Any idea how to do this?

Upvotes: 0

Views: 32

Answers (2)

Tom Sharpe
Tom Sharpe

Reputation: 34220

As it just doubles each time, you could also write it as an array formula:

=ArrayFormula((A1+B1)*2^(column(C1:1)-3))

enter image description here

Upvotes: 1

Krzysztof Dołęgowski
Krzysztof Dołęgowski

Reputation: 2660

You mean this?

enter image description here

You should use absolute addressing to first column in the range you want to sum and relative addressing to last column. Then you can drag your formula right as far as you want.

Upvotes: 2

Related Questions