I am trying to build a spreadsheet that keeps track of my inventory. I want to use the First In First Out approach and need the formula to solve the following problem. I want to subtract the value 16 from the list of stocks over multiple rows.
Value= 16
Column A --> Column B
10 0
5 0
2 1
3 3
12 12
Sample below:
=B2-A2
. Copy down.=IF(B2>A2,0,IF(B2>0,A2-B2,A2))
. Copy down.