epardo87
Board Regular
- Joined
- Feb 24, 2015
- Messages
- 56
Hello there,
So I need to formulate a matrix out of two tables:
<tbody>[TR]
[TD]Customer[/TD]
[TD]Product[/TD]
[TD]January[/TD]
[TD]February[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]A[/TD]
[TD]400(Inv)-200(order)=200(inv); result in this cell =0[/TD]
[TD]50(inv)-100(order)=50(order);
Result in this cell=50[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]B[/TD]
[TD]60(Inv) - 50(order)=10(inv); result in this cell=0[/TD]
[TD]10(inv)-40(order)=30(order);
Result in this cell = 30[/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD]A[/TD]
[TD]200(inv)-150(order)=50(inv);
result in this cell=0[/TD]
[TD]0(inv)-150(order)=150(order)
result in this cell = 150[/TD]
[/TR]
</tbody>[/TABLE]
So I need to formulate a matrix out of two tables:
- I have the inventory table has the product number and the current full cuantity available:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Product[/TD]
[TD]Inventory[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]400[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]60[/TD]
[/TR]
</tbody>[/TABLE]
<tbody>[TR]
[TD]Product[/TD]
[TD]Inventory[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]400[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]60[/TD]
[/TR]
</tbody>[/TABLE]
- I also have a matrix and it's arranged in orders of each product per customer per month:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Product[/TD]
[TD]January[/TD]
[TD]February[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]A[/TD]
[TD]200[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]B[/TD]
[TD]50[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD]A[/TD]
[TD]150[/TD]
[TD]150[/TD]
[/TR]
</tbody>[/TABLE]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Product[/TD]
[TD]January[/TD]
[TD]February[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]A[/TD]
[TD]200[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]B[/TD]
[TD]50[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD]A[/TD]
[TD]150[/TD]
[TD]150[/TD]
[/TR]
</tbody>[/TABLE]
- The new matrix would be identical to the order matrix but I need a formula which rests inventory out of the original order (to know how much I need to produce)
- so it would require a formula that uses the inventory table only when the first order of that product appears, but for following orders of same product it would rest from the remaining quantity
- it also needs to consider remaining quantity of previous months
- ***don't worry about inventory additions, it's not required for this analysis***
<tbody>[TR]
[TD]Customer[/TD]
[TD]Product[/TD]
[TD]January[/TD]
[TD]February[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]A[/TD]
[TD]400(Inv)-200(order)=200(inv); result in this cell =0[/TD]
[TD]50(inv)-100(order)=50(order);
Result in this cell=50[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]B[/TD]
[TD]60(Inv) - 50(order)=10(inv); result in this cell=0[/TD]
[TD]10(inv)-40(order)=30(order);
Result in this cell = 30[/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD]A[/TD]
[TD]200(inv)-150(order)=50(inv);
result in this cell=0[/TD]
[TD]0(inv)-150(order)=150(order)
result in this cell = 150[/TD]
[/TR]
</tbody>[/TABLE]