Google Spreadsheet sum which always ends on the cell above

后端 未结 7 1459
余生分开走
余生分开走 2020-12-24 01:30

How to create a Google Spreadsheet sum() which always ends on the cell above, even when new cells are added? I have several such calculations to make on each single column s

7条回答
  •  旧巷少年郎
    2020-12-24 01:49

    The answer by @PsychoFish led me in the correct way. The only issue that I had to rewrite the formula again from each column and each sum. So here is the improved formula, which sums the previous 9 cells on the same column, without hardcoding the column or row numbers:

    =SUM(INDIRECT(ADDRESS(ROW()-9,COLUMN(),4)&":"&ADDRESS(ROW()-1,COLUMN(),4)))
    

    The only issue is that I had to rewrite the formulas if someone adds or deletes a row. In this case I should change 9 to 10 or 8 corrspondingly.

提交回复
热议问题