Formula Help

Copper Contributor
 ABC

1

QTY. BoughtRemainCost

2

102$5

3

1010$8

I am working making a material tracking sheet and i am trying to find a way for a cell to equal one cost until the remaining Value becomes 0 then as the inventory is is pulling from the remaining value of the next row it would equal the cost equal to the row 

 

in short use C2 until B2 = 0 then use C3 until B3 =0 then use C4 and so on any suggestions?

0 Replies