Gingertrees
Well-known Member
- Joined
- Sep 21, 2009
- Messages
- 697
column A has dates, column B has values.
so, e.g.
A B
8/1 200
8/2 123
8/3 64
8/4 211
8/5 187
8/6 46
etc
It's long. I want excel to find the last row, and show a sum of the values one row above that row.
So if 8/6 is the last row of used data, I want a sum of the B values from 8/1 - 8/5 (omitting bottom row from sum).
I can find the last row with
Lastdata1 = Range("B65536").End(xlUp).Row
But I don't know how to get that into something like
Sum (B2:2ndtolastrow).
And this should be like a workbook_open or worksheet_change or something, as the numbers in the bottom row change constantly.
(Banging head repeatedly as I try and fail to write the correct syntax).
so, e.g.
A B
8/1 200
8/2 123
8/3 64
8/4 211
8/5 187
8/6 46
etc
It's long. I want excel to find the last row, and show a sum of the values one row above that row.
So if 8/6 is the last row of used data, I want a sum of the B values from 8/1 - 8/5 (omitting bottom row from sum).
I can find the last row with
Lastdata1 = Range("B65536").End(xlUp).Row
But I don't know how to get that into something like
Sum (B2:2ndtolastrow).
And this should be like a workbook_open or worksheet_change or something, as the numbers in the bottom row change constantly.
(Banging head repeatedly as I try and fail to write the correct syntax).