I've attached a workbook which has 6 columns of data (stock purchased and sold).
The purchases and sales are not "matched" one to one. There are partial sales, and dates where stock is both bought and sold.
Over a period of two weeks, the net shares held may go from zero to 200, and back to zero. Then the cycle begins again.
For each cycle, I want to get the average price of shares, updated daily as shares are bought and sold within that cycle.
I've tried some nested "if/then" formulas, and have almost solved the problem, but it eventually falls apart. (See worksheet, highlighted row).
I'm hoping one of you geniuses can help me find a solution. As always, I'll very much appreciate any help!
Bookmarks