Google-sheets – Google Sheets spreading cost over columns and summing

google sheets

Say I have in Google Sheets:

  Price per month: $9
  Number of months: 3 (each subscription lasts 3 months)

Number of subscriptions per month. (A = month 1, B = month2…)

A  B  C  D  E
1  0  3  0  2

I’d like to create some routine that will sum the total cost per month.

Month 1 = 9.
Month 2 = 9.
Month 3 = 9 + (3*9).
Month 4 = (3*9)  (since the subscription from Month 1 is not expired)
Month 5 = (3*9) + (2*9)

Is this possible? Ideally, months would be in columns.

So my results would be:

A   B   C   D   E
9   9   36  27  45

Best Answer

You just seem to need a three-month running total and a multiplier. In C3 and copied down:

=sum(B1:B3)*$A$2

Ensure the C1:C2 cells do not contain anything that would be taken as a number.

WA10937 example