Here is my excel sheet having buying details on the left and the selling details on the right.
A2 is the total buying average.
I2 is the total selling average.
E2 is the remaining Stock.
E4 is the Cell where I need to get the desired result of average cost of remaining (unsold) stock.
I have tried to explain it while using the data of rows 6 and 7. The average buying cost of remaining (unsold) stock.
=((C6*(B6-H6)) + (C7*(B7-H7)))/((B6-H6)+(B7-H7))
Is there any formula or shortcut method to get the desired result for whole of the sheet data, i.e. average cost of all remaining (unsold) stock.

A2 is the total buying average.
I2 is the total selling average.
E2 is the remaining Stock.
E4 is the Cell where I need to get the desired result of average cost of remaining (unsold) stock.
I have tried to explain it while using the data of rows 6 and 7. The average buying cost of remaining (unsold) stock.
=((C6*(B6-H6)) + (C7*(B7-H7)))/((B6-H6)+(B7-H7))
Is there any formula or shortcut method to get the desired result for whole of the sheet data, i.e. average cost of all remaining (unsold) stock.
