imaliuddin
New Member
- Joined
- Oct 26, 2019
- Messages
- 2
Hello Experts,
I need your help to automate a long manual activity which takes allot of time. Every week I have received stock transfer requests of 500 line items from LHR and ISB to replenish the stock from KHI which is our central Warehouse to feed both locations. Please see below table with expected results which i want to be derived from formula. Purpose is to make inventory transfer of available quantity in KHI to LHR/ISB with equality keeping in view who has more deficit and who has more average monthly sales/consumption. Below are the conditions which I have made and if anyone of you feels that is not logical or need changes you can make changes in the attach excel file while replying to the solution.
[TABLE="width: 1349"]
<tbody>[TR]
[TD]Note:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 17"]Stock can not be transfer in decimals and negative numbers it has to be a whole number so rounding would be required keeping in view the available stock in KHI up to the max of LHR and ISB average monthly sales.[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Below are the logics[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 12"]1-Since KHI is our mother location so it has to be make sure KHI should not be < its monthly sales no matter LHR and ISB has zero stock[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 12"]2-If LHR or ISB has current stock = their monthly average sales then no transfer is required no matter quantities are available in KHI[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 10"]3-Transfer will only be executed if LHR / ISB has < its average monthly sales means if their current deficit < 100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 10"]4- if KHI has enough stock to fulfill both LHR/ISB requirement then relenish both upto their max deficit[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 10"]5- if KHI has only one extra qty and deficit of anyone location is >= 80% then proceed transfer to that location[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 13"]6- if KHI has only one extra qty and deficit of both location is >= 80% then check whose average sales is higher then otherone then proceed for that location[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]7- if both locations deficit is equal and KHI available is not enough to satisfy both then the qty will be equally devided equally to both keeping in view of if quantity is ODD then it will be -1 then divided by 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]8- If one has defcit >= 80% and other has <=20% and available stock can completely fullfil the one has higher deficit then all feed to that one and if still have leftover stock in khi then send to other location[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 14"]9- If one has defcit >= 80% and other has <=20% and khi has not enough to fullfill the one has higher deficit completely then available stock will be splitted in 80-20% respectively[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]10- If one has defcit >= 60% and other has <=35% and available stock can completely fullfil the one has higher deficit then all feed to that one and if still have leftover stock in khi then send to other location[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 14"]11- If one has defcit >= 60% and other has <=35% and khi has not enough to fullfill the one has higher deficit completely then available stock will be splitted in 60-35% respectively[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 14"]12- If one has defcit >= 45% and other has <=35% and khi has not enough to fullfill the one has higher deficit completely then available stock will be splitted in 45-35% respectively[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]13- If one has defcit >= 45% and other has <=35% and available stock can completely fullfil the one has higher deficit then all feed to that one and if still have leftover stock in khi then send to other location[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 14"]14- If one has defcit >= 35% and other has <=20% then available stock will be splitted equally keeping in view if quantity is ODD then it will be -1 then divided by 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 13"]15- If one has defcit <= 35% and other has <=20% then available stock will be splitted equally keeping in view of ODD then it will be -1 then divided by 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 1086"]
<tbody>[TR]
[TD][/TD]
[TD="colspan: 3, align: center"]Average Monthly Sales[/TD]
[TD="colspan: 3, align: center"]Current Stock[/TD]
[TD="colspan: 4, align: center"]Current Deficit[/TD]
[TD="align: center"][/TD]
[TD="colspan: 2, align: center"]This is the expected outcome[/TD]
[/TR]
[TR]
[TD="align: center"]Items[/TD]
[TD="align: center"]KHI[/TD]
[TD="align: center"]LHR[/TD]
[TD="align: center"]ISB[/TD]
[TD="align: center"]KHI[/TD]
[TD="align: center"]LHR[/TD]
[TD="align: center"]ISB[/TD]
[TD="align: center"]LHR Qty[/TD]
[TD="align: center"]LHR%[/TD]
[TD="align: center"]ISB Qty[/TD]
[TD="align: center"]ISB[/TD]
[TD="align: center"]How much Extra in KHI[/TD]
[TD="align: center"]LHR[/TD]
[TD="align: center"]ISB[/TD]
[/TR]
[TR]
[TD]Item-01[/TD]
[TD]81[/TD]
[TD]9[/TD]
[TD]21[/TD]
[TD]200[/TD]
[TD]20[/TD]
[TD]15[/TD]
[TD]11[/TD]
[TD]122%[/TD]
[TD]-6[/TD]
[TD]-29%[/TD]
[TD]119[/TD]
[TD]Enough Stock[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]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D]5[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Item-08[/TD]
[TD]59[/TD]
[TD]10[/TD]
[TD]32[/TD]
[TD]67[/TD]
[TD]7[/TD]
[TD]18[/TD]
[TD]-3[/TD]
[TD]-30%[/TD]
[TD]-14[/TD]
[TD]-44%[/TD]
[TD]8[/TD]
[TD]1[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Item-09[/TD]
[TD]42[/TD]
[TD]26[/TD]
[TD]27[/TD]
[TD]43[/TD]
[TD]17[/TD]
[TD]8[/TD]
[TD]-9[/TD]
[TD]-35%[/TD]
[TD]-19[/TD]
[TD]-70%[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Item-10[/TD]
[TD]53[/TD]
[TD]40[/TD]
[TD]29[/TD]
[TD]66[/TD]
[TD]31[/TD]
[TD]22[/TD]
[TD]-9[/TD]
[TD]-23%[/TD]
[TD]-7[/TD]
[TD]-24%[/TD]
[TD]13[/TD]
[TD]7[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance
I need your help to automate a long manual activity which takes allot of time. Every week I have received stock transfer requests of 500 line items from LHR and ISB to replenish the stock from KHI which is our central Warehouse to feed both locations. Please see below table with expected results which i want to be derived from formula. Purpose is to make inventory transfer of available quantity in KHI to LHR/ISB with equality keeping in view who has more deficit and who has more average monthly sales/consumption. Below are the conditions which I have made and if anyone of you feels that is not logical or need changes you can make changes in the attach excel file while replying to the solution.
[TABLE="width: 1349"]
<tbody>[TR]
[TD]Note:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 17"]Stock can not be transfer in decimals and negative numbers it has to be a whole number so rounding would be required keeping in view the available stock in KHI up to the max of LHR and ISB average monthly sales.[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Below are the logics[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 12"]1-Since KHI is our mother location so it has to be make sure KHI should not be < its monthly sales no matter LHR and ISB has zero stock[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 12"]2-If LHR or ISB has current stock = their monthly average sales then no transfer is required no matter quantities are available in KHI[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 10"]3-Transfer will only be executed if LHR / ISB has < its average monthly sales means if their current deficit < 100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 10"]4- if KHI has enough stock to fulfill both LHR/ISB requirement then relenish both upto their max deficit[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 10"]5- if KHI has only one extra qty and deficit of anyone location is >= 80% then proceed transfer to that location[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 13"]6- if KHI has only one extra qty and deficit of both location is >= 80% then check whose average sales is higher then otherone then proceed for that location[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]7- if both locations deficit is equal and KHI available is not enough to satisfy both then the qty will be equally devided equally to both keeping in view of if quantity is ODD then it will be -1 then divided by 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]8- If one has defcit >= 80% and other has <=20% and available stock can completely fullfil the one has higher deficit then all feed to that one and if still have leftover stock in khi then send to other location[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 14"]9- If one has defcit >= 80% and other has <=20% and khi has not enough to fullfill the one has higher deficit completely then available stock will be splitted in 80-20% respectively[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]10- If one has defcit >= 60% and other has <=35% and available stock can completely fullfil the one has higher deficit then all feed to that one and if still have leftover stock in khi then send to other location[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 14"]11- If one has defcit >= 60% and other has <=35% and khi has not enough to fullfill the one has higher deficit completely then available stock will be splitted in 60-35% respectively[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 14"]12- If one has defcit >= 45% and other has <=35% and khi has not enough to fullfill the one has higher deficit completely then available stock will be splitted in 45-35% respectively[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]13- If one has defcit >= 45% and other has <=35% and available stock can completely fullfil the one has higher deficit then all feed to that one and if still have leftover stock in khi then send to other location[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 14"]14- If one has defcit >= 35% and other has <=20% then available stock will be splitted equally keeping in view if quantity is ODD then it will be -1 then divided by 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 13"]15- If one has defcit <= 35% and other has <=20% then available stock will be splitted equally keeping in view of ODD then it will be -1 then divided by 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 1086"]
<tbody>[TR]
[TD][/TD]
[TD="colspan: 3, align: center"]Average Monthly Sales[/TD]
[TD="colspan: 3, align: center"]Current Stock[/TD]
[TD="colspan: 4, align: center"]Current Deficit[/TD]
[TD="align: center"][/TD]
[TD="colspan: 2, align: center"]This is the expected outcome[/TD]
[/TR]
[TR]
[TD="align: center"]Items[/TD]
[TD="align: center"]KHI[/TD]
[TD="align: center"]LHR[/TD]
[TD="align: center"]ISB[/TD]
[TD="align: center"]KHI[/TD]
[TD="align: center"]LHR[/TD]
[TD="align: center"]ISB[/TD]
[TD="align: center"]LHR Qty[/TD]
[TD="align: center"]LHR%[/TD]
[TD="align: center"]ISB Qty[/TD]
[TD="align: center"]ISB[/TD]
[TD="align: center"]How much Extra in KHI[/TD]
[TD="align: center"]LHR[/TD]
[TD="align: center"]ISB[/TD]
[/TR]
[TR]
[TD]Item-01[/TD]
[TD]81[/TD]
[TD]9[/TD]
[TD]21[/TD]
[TD]200[/TD]
[TD]20[/TD]
[TD]15[/TD]
[TD]11[/TD]
[TD]122%[/TD]
[TD]-6[/TD]
[TD]-29%[/TD]
[TD]119[/TD]
[TD]Enough Stock[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Item-02[/TD]
[TD]67[/TD]
[TD]32[/TD]
[TD]28[/TD]
[TD]108[/TD]
[TD]25[/TD]
[TD]25[/TD]
[TD]-7[/TD]
[TD]-22%[/TD]
[TD]-3[/TD]
[TD]-11%[/TD]
[TD]41[/TD]
[TD]7[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Item-03[/TD]
[TD]57[/TD]
[TD]30[/TD]
[TD]11[/TD]
[TD]36[/TD]
[TD]33[/TD]
[TD]10[/TD]
[TD]3[/TD]
[TD]10%[/TD]
[TD]-1[/TD]
[TD]-9%[/TD]
[TD]-21[/TD]
[TD]KHI Low[/TD]
[TD]KHI Low[/TD]
[/TR]
[TR]
[TD]Item-04[/TD]
[TD]0[/TD]
[TD]26[/TD]
[TD]14[/TD]
[TD]36[/TD]
[TD]0[/TD]
[TD]7[/TD]
[TD]-26[/TD]
[TD]-100%[/TD]
[TD]-7[/TD]
[TD]-50%[/TD]
[TD]36[/TD]
[TD]26[/T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