Supplementary to that, I would like to sum a column until a break occurs and place the subtotal in the cell immediately right of the column on the same line as the last value but then to continue the accumulative count to the end of the range.
The scenario is that there are two columns (one for 12 monthly payments simply) and the other for 13 monthly payments in the same 12 month period (one every four weeks with a fluid start date) which means that one month in the year is duplicated and thus the 12 monthly duplicated column should remain blank. (I've changed the background colour of the extra cell simply to highlight it).
The attached spreadsheet provides an example of what I am trying to achieve.
Column H shows the result of the answer already provided and Column I the result of the modified code provided which resets the accumulator after the first blank line.
What I would like to see is the running total as per the LAMBDA formula in column D (contained in cell
D3) but for the remaining cells in the example from D9 downwards (or where ever the next break occurs) to remain blank if there is no value in the corresponding line in column C.
Column I is what I have managed to achieve so far but this does not accumulate the running total.
I'm certain there is a simple tweak to the code behind cell
I1 but this has so far defeated me.