# Calculate using a cell address that increases

#### kcompton

##### Board Regular
Hi - I am trying to calculate 200000 minus a number in a cell address that changes when I insert an additional row.
For example,
200,000 minus D3. (D3 is the sum of the range D1:D2)
but then I insert a row and the calculation has to become
200000 minus D4 (where D4 is the sum of the range D1:D3)

Thanks for any help -

### Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

#### Joe4

Is the cell you want to subtract ALWAYS the last cell in thet column?

There are a number of options, including:
1. Change the structure of your workbook, so that the SUM is at the top, instead of at the bottom (so that row won't move as rows are inserted).
2. Make it a named range and reference it that way (the named range will automatically move as you insert row).
3. Use a formula that returns the last cell in the column (see: https://exceljet.net/formula/get-value-of-last-non-empty-cell)

#### kcompton

##### Board Regular
Thank you Joe4 -
Yes, the cell is Always the last cell in the column.
I previously tried the Lookup option, but not in the correct format referenced int the link you provided.
Thank you so much for your help.

You are welcome.