G'Day
I think I have a solution for you (well at least a solution to resetting the total at the beginning of the month).
=IF(C2>0,IF(MONTH(D2)>MONTH(D1),G2,SUM(G2,L1)),0) where row 1 is your first data row. This formula goes in L2 and is copied down.
Explanation:
If Cx is zero then you get a zero, if not then you compare the months of Dx with Dx-1 (dates), if Dx is greater then you have the first used date of the new month (which does not have to be the first of the month) so your total is the value of Gx, otherwise the total is the running total upto Lx-1 plus Gx.
Hope this helps.
Do you mind if I have a play with the formulas and spreadsheet over the weekend? If not I will email you the results of my fiddling if you want it? Just email you answer.
Time for bed, it is nearly 2:30am Thursday ;)
Geoff