The file is attached with some modifications but gives the same results
Column H is only auxiliary
You must sort column A after you edit the data
This code I learned from participation in this wonderful forum
Thanks for the effort. Currently we have 400 different type of product and I will have two different sheet, Sales and Purchase.
I am trying to link so that the FIFO cogs is calculated for my sales and get the profit numbers.
I am also try because the condition i need to have is
1. the Inventory is not negative
2. the inventory date is before the sale proceed
3. in which row the balance quantity starts.
4. the cost calculation there may 1 or multiple row with multiple prices. I don't want to have a average price as the number differs