How to display content of last cell in column as a total

Hi all,

I am having trouble displaying the value of the last cell in a column as a total in a cell further down that same column.

That is a bit cryptic, so let me explain:
The spreadsheet is a simple accounting system. Column A is for the date of the transaction, B is for a description of the transaction, C is for debits, D is for credits, E is for the running total (balance).

I have used =IF(OR(ISNUMBER(C12), ISNUMBER(D12)),E11-C12+D12,"" to leave any cells in E blank if there is no value in A:D for that row. Up to that point, everything works as I want.

My problem is that I want to display the total in cell E29. There are values up to E12, then E13:E28 are blank, so I need to find a way for E29 to reference the last cell in column E that contains a numeric value (in this case E12, but that will change when more transactions are entered).

I would be very grateful for any help or guidance you may provide.

Hallo

=SUM($D$1:$D$28)-SUM($C$1:$C$28)
3 Likes

So obvious. So simple. I love it. I got so caught up in trying to reference the last value in the same column that I didn’t see this.

Thanks Karolus!

If you insert rows before line 12 to add more values, you can improve the formula, using a mixture of absolute and relative references, so that you need not modify it (it will be done automatically:

=SUM($D$1:$D28)-SUM($C$1:$C28)

Note the removal of two $ signs.

1 Like