OK... here we go. I think should do alright.
Now I'll go 1 cell at a time...
A2:
=LOOKUP(9.99999999999999E+307,G:G)
This will return the value in the last cell in the G column.
The "E" and "F" columns are simple straight numbers. The only snag that I was coming across, is that in order to make the math work properly, you have to manually add the "-" (minus) symbol to the "withdrawal" column. I wanted to find a way around that, but I couldn't find anything.
G2:
=IF(AND(ISBLANK(E2),ISBLANK(F2)),"",SUM(E2,F2))
This code only applies to G2, although it's almost the same as the rest of the G column, which is:
=IF(AND(ISBLANK(E3),ISBLANK(F3)),"",SUM(E3,F3,G2))
All it is is adding the previous G cell to the SUM at the end.
Then on the formatting, I just made columns E through G money format, and then I used conditional formatting to make it all red when negative values occur.
Conditional Formatting:
Format>Conditional Formatting
Cell Value Is - less than or equal to - 0
Then format it however you want the negatives to show.
If this works for what you want, then that's great.
Otherwise let me know...
Sincerely,
kyle_engineer