Hi,
I'm have a large data set and am trying to identify a formula that will make a calculation based on the sequence number. Example below.
From a lookup I have identified that a quantity of 3 are packed, but I want the 3 to be deducted from the first schedule line only, and if the schedule quantity is less than the packed quantity, to deduct the remainder from the next sequence and so on.
In the case of the below, in the sequence qty column, the results should read: 2 for sequence 1, 1 for sequence 2 and 0 for sequence 3.
Anyone have any ideas? I'm hoping its possible! Thanks in advance to anyone that can help
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 430"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]ORDER No_ITEM No[/TD]
[TD]Total Order Quantity[/TD]
[TD]Sequence Number[/TD]
[TD]Sequence Qty[/TD]
[TD]Packed Qty[/TD]
[/TR]
[TR]
[TD]6075_10[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]6075_10[/TD]
[TD]6[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]6075_10[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>
[/TD]
[TD]<strike></strike>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm have a large data set and am trying to identify a formula that will make a calculation based on the sequence number. Example below.
From a lookup I have identified that a quantity of 3 are packed, but I want the 3 to be deducted from the first schedule line only, and if the schedule quantity is less than the packed quantity, to deduct the remainder from the next sequence and so on.
In the case of the below, in the sequence qty column, the results should read: 2 for sequence 1, 1 for sequence 2 and 0 for sequence 3.
Anyone have any ideas? I'm hoping its possible! Thanks in advance to anyone that can help
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 430"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]ORDER No_ITEM No[/TD]
[TD]Total Order Quantity[/TD]
[TD]Sequence Number[/TD]
[TD]Sequence Qty[/TD]
[TD]Packed Qty[/TD]
[/TR]
[TR]
[TD]6075_10[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]6075_10[/TD]
[TD]6[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]6075_10[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>
[/TD]
[TD]<strike></strike>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]