# Sorting data with conditions

#### stuckhere

##### New Member
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

 A 2515 B 5030 C 10060 D 5030 E 15090 F 2515 G 5030 H 5030 I 2515 J 2515 K 5030 L 10060 M 5030 N 2515 O 5030 P 10060 Q 5030 R 15090 S 2515 T 5030 U 5030 V 2515 W 5030 X 2515

<tbody>
</tbody>

So based on this data it would look as follows:

Section 1- PART A
 A 2515 B 5030 C 10060 D 5030 E 15090 F 2515 G 5030

<tbody>
</tbody>

Sum of section 1 part A - 45270. Is divisable by 15- OK

SECTION 2 - PART B

 H 5030 I 2515 J 2515 K 5030 L 10060 M 5030

<tbody>
</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

 N 2515 O 5030 P 10060 Q 5030 R 15090 S 2515 T 5030

<tbody>
</tbody>

Sum of section 3 part A - 45270. Is divisable by 15- OK

Section 3 PART B

 U 5030 V 2515 W 5030

<tbody>
</tbody>
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.

### Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Replies
11
Views
395
Replies
0
Views
125
Replies
4
Views
621
Replies
2
Views
92
Replies
3
Views
150

1,186,696
Messages
5,959,223
Members
438,408
Latest member
arjuntalgotra11

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back