I have a Google Spreadsheets in which I keep a list of expenses. I add a new expense by inserting a new row above the last expense. On the first row of the spreadsheet, I keep a sum of all expenses: =SUM(D4:D101)
.
However, when I add a new row, the function range shifts down by one row to =SUM(D5:D102)
, i.e. it is still covering the previous range of expenses, but I would like it to include the most recent one on line 4 as well: =SUM(D4:D102)
.
As I add new rows quite often, I would like the spreadsheet to do this automatically.
Do you know how to achieve this?
=SUM(D3:D102)
? Inserting a row would expand your range, because the row is inserted "within" that range and not "above" it. After an insert, it would become=SUM(D3:D102)
. If There is a value in D3 you don't want to add, you can use=SUM(D3:D102)-D3
. If there is a label in D3, Google won't bother and just use the value0
(zero) for that label.