I need to write a formula that will continue to sum up deficits and gains across a row in a running total when the total remains a negative number (not out of the deficit) but then gives a running total of "0" when that running total number becomes positive, and then if the running total number becomes negative again after that (numbers in subsequent columns), will start summing from there, discounting everything previously before the last "0" in the row.
For example, if person is -110 in the hole for first quarter, running total should read -110; then in Q2 gains 10, running total should read -100; then Q3 loses -40, running total should read -140; then in Q4 gains 150, running total should read 0; then in next fiscal year Q1 loses -30, running total should read -30.
So over the course of a couple of years, I need it to keep track of the deficit until the person climbs out of the deficit and is at 0 or above, then begin tracking that deficit again if they go negative. Each quarter, I need to send in everyone's deficits or lack thereof, and I would like to have it all formatted ahead of time so I can just plug in the number from the current quarter and have the running total be either 0 if they are not in a cumulative deficit or display the actual deficit if they do have a deficit.
Is this posisible?