Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Duplicates

Hi there,

I have attached a file. Say I have five groups from 1 to 5. In each group I have products - A, B, C...Now each product has its count. In each group when each of these products come together, that's when you can build a main product. So in this case your minimum count of each group is what determines your maximum build in each group.

Now say for Group 1,  'A' has 10 qty so when it's subtracted by its minimum quantity, that leaves A's count as 5. Now the next group that 'A' features in the count from 10 should be reduced till 5 and similarly for B, C, D, their counts will reduce as I have shown in the actual column. Now I can manage everything till here.

The help that I need is when the count from the first group reduces, the minimum count of the subsequent groups should reduce too. For instance for Group 2 the minimum count will be 3 and not 8, similarly for Group 3 it will be 5 and not 7 and group 4 will be 0 and not 5.

So before I get the actual count for the next group I need to ensure the minimum count is first reduced in order to get the correct actual count. I suppose this might need a For loop but am unable to find a solution.

Please note I need the code to be executed during load.

Can someone help please? Thanks.

0 Replies