Hello Everyone,
Thanks in advance for taking the time to review my problem. Please see attached. This spreadsheet is a culmination of the hard work from so many great contributers from this community.
Column J is for calculating a running quantity with each purchase and sale. Starting in J8, here is the current formula:
=IF(AND(B7<>"Sale",ROUND(SUM(F$7:F8),0)>=0),J7+F8,F8)
This works really good until we get down to J25 (highlighted in red) and we see something that doesn't make sense. If calculated properly, it should equal 40.69221224 (J24 + F25)
With the current formula, instead of doing J24+F25, it simply drags over F25.
How can this formula be corrected to do this right while still keeping all the correctly calculated values above it? I've tried a few things but can't seem to figure it out.
Feel free to un-highlight the black columns if you need to see the rest of the data. I blacked them out as they aren't needed for this column and to help bring focus on where the problem comes in (red highlights).
Bookmarks