Hi all, does anyone know how if you can automatically populate an active cell with a sum formula that will total the cells between the last instance of a sum formula in a column above the active cell and the active cell itself? I currently just use the auto sum on the ribbon but the unfortunately manner in which the sheets are formatted means that there are gaps between figures so I always end up manually dragging the range.
To demonstrate (albeit very simplistically) the sheet would appear something like this (where the text appears in column B and the total in column G)...
Text A Total A
Blank Row
Text B Total B
Blank Row
Sub-Total
Blank Row
Text C Total C
Blank Row
Text D Total D
Blank Row
Text E Total E
Blank Row
Sub-Total (VBA to insert Sub-Total of total C, D and E here)
To further complicate things there are rows beneath the active cell which are populated so the code would need to offset up from the active cell rather than find the last used cell in the column. Also sometimes there is more than 1 blank row between totals).
If anyone has any idea how to achieve this I'd be very grateful. Thanks in advance!
Cheers,
rrenis.