I have made an Excel sheet for calculating profit from investment in shares on FIFO basis I am attaching the demo sheet to explain the requirements However if the quantities of sale and purchase are different then I have to manually split the purchase qu