Hi Jordan,
sorry, the code is to long, I lost track.
But why are those
ENDIF. ENDIF.
ENDFOR.
in the end of the code?
Which loops are closing there?
Especially the endfor seems not to be right.
make sure, that you do not have several loops creating again the 0balance and overwriting the result from a former loop.
or better - take the result calcualtion out and put it after other loops.
regards
Cornelia