Hi,
Appologies if this is long winded but it seemed the easiest way to explain myself.
I need to create a solution to break the following table up into multiple, 2 part sections A&B.
The total quanity of each section must be divisable by 15. Neither section can exceed 45,270 and the sum of the two sections cannot exceed 75,450. The remainder can go in the final section however again cannot exceed 75450
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"]A[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]B[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]C[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]D[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]E[/TD]
[TD="class: xl65, width: 64, align: right"]15090[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]F[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]G[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]H[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]I[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]J[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]K[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]L[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]M[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]N[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]O[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]P[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Q[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]R[/TD]
[TD="class: xl65, width: 64, align: right"]15090[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]S[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]T[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]U[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]V[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]W[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]X[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
</tbody>[/TABLE]
So based on this data it would look as follows:
Section 1- PART A
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"]A[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]B[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]C[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]D[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]E[/TD]
[TD="class: xl65, width: 64, align: right"]15090[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]F[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]G[/TD]
[TD="class: xl65, width: 64, align: right"]5030
[/TD]
[/TR]
</tbody>[/TABLE]
Sum of section 1 part A - 45270. Is divisable by 15- OK
SECTION 2 - PART B
<tbody>
[TD="class: xl65"]H[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[TD="class: xl65, width: 64"]I[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[TD="class: xl65, width: 64"]J[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[TD="class: xl65, width: 64"]K[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[TD="class: xl65, width: 64"]L[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[TD="class: xl65, width: 64"]M[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
</tbody>
Sum of section 2 part B - 30180. Is divisable by 15 -OK
Sum of Part A & Part B is 75450 - OK
Section 3 - PART A
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"]N[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]O[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]P[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Q[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]R[/TD]
[TD="class: xl65, width: 64, align: right"]15090[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]S[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]T[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
</tbody>[/TABLE]
Sum of section 3 part A - 45270. Is divisable by 15- OK
Section 3 PART B
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"]U[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]V[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]W[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, align: right"][/TD]
[/TR]
</tbody>[/TABLE]
Sum of section 3 part B - 12575 - NOT DIVISABLE by 15 but as the remainder this is ok
Sum of Part A & Part B is 57845 - OK
Any help as to how to achive this is much appreciated.
Appologies if this is long winded but it seemed the easiest way to explain myself.
I need to create a solution to break the following table up into multiple, 2 part sections A&B.
The total quanity of each section must be divisable by 15. Neither section can exceed 45,270 and the sum of the two sections cannot exceed 75,450. The remainder can go in the final section however again cannot exceed 75450
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"]A[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]B[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]C[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]D[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]E[/TD]
[TD="class: xl65, width: 64, align: right"]15090[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]F[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]G[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]H[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]I[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]J[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]K[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]L[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]M[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]N[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]O[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]P[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Q[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]R[/TD]
[TD="class: xl65, width: 64, align: right"]15090[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]S[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]T[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]U[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]V[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]W[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]X[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
</tbody>[/TABLE]
So based on this data it would look as follows:
Section 1- PART A
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"]A[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]B[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]C[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]D[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]E[/TD]
[TD="class: xl65, width: 64, align: right"]15090[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]F[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]G[/TD]
[TD="class: xl65, width: 64, align: right"]5030
[/TD]
[/TR]
</tbody>[/TABLE]
Sum of section 1 part A - 45270. Is divisable by 15- OK
SECTION 2 - PART B
<tbody>
[TD="class: xl65"]H[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[TD="class: xl65, width: 64"]I[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[TD="class: xl65, width: 64"]J[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[TD="class: xl65, width: 64"]K[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[TD="class: xl65, width: 64"]L[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[TD="class: xl65, width: 64"]M[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
</tbody>
Sum of section 2 part B - 30180. Is divisable by 15 -OK
Sum of Part A & Part B is 75450 - OK
Section 3 - PART A
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"]N[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]O[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]P[/TD]
[TD="class: xl65, width: 64, align: right"]10060[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]Q[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]R[/TD]
[TD="class: xl65, width: 64, align: right"]15090[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]S[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]T[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
</tbody>[/TABLE]
Sum of section 3 part A - 45270. Is divisable by 15- OK
Section 3 PART B
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"]U[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]V[/TD]
[TD="class: xl65, width: 64, align: right"]2515[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64"]W[/TD]
[TD="class: xl65, width: 64, align: right"]5030[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, align: right"][/TD]
[/TR]
</tbody>[/TABLE]
Sum of section 3 part B - 12575 - NOT DIVISABLE by 15 but as the remainder this is ok
Sum of Part A & Part B is 57845 - OK
Any help as to how to achive this is much appreciated.