Group Items based on Criteria

crazydeo

New Member
Joined
Jul 18, 2014
Messages
3
Hi, not sure how to best use excel to solve the following....

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Gender[/TD]
[TD]Material[/TD]
[TD]Qty[/TD]
[/TR]
</tbody>[/TABLE]

I have the following information. I need to group the Materials by gender with a max of 5000 qty per group without partially splitting the materials into 2 separate groups.

Any help or direction would be greatly appreciated!!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
is steel "male" and coal "female"

seriously give us a few rows of raw data with a table of your expected results
 
Upvote 0
Here is the sample data:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Gender[/TD]
[TD]Material[/TD]
[TD]QTY[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-11[/TD]
[TD]250[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-12[/TD]
[TD]1500[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-13[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-14[/TD]
[TD]4500[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-15[/TD]
[TD]2500[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-16[/TD]
[TD]245[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-17[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-18[/TD]
[TD]4900[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-19[/TD]
[TD]2500[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-20[/TD]
[TD]100[/TD]
[/TR]
</tbody>[/TABLE]


Want it to be organized by gender, then material, grouped in qty of 5000 units max

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Gender[/TD]
[TD]Material[/TD]
[TD]QTY[/TD]
[TD]Group[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-19[/TD]
[TD]2500[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-12[/TD]
[TD]1500[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-13[/TD]
[TD]1000[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-18[/TD]
[TD]4900[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]women[/TD]
[TD]MAT-20[/TD]
[TD]100[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-14[/TD]
[TD]4500[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-11[/TD]
[TD]250[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-16[/TD]
[TD]245[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-17[/TD]
[TD]5[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]men[/TD]
[TD]MAT-15[/TD]
[TD]2500[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]

Hope this clarifies it!
 
Upvote 0
why does lower table start with women mat 19 2500
why are all women before any men

I do see how a group must not contain more than 5000 items
 
Upvote 0
why does lower table start with women mat 19 2500
why are all women before any men

I do see how a group must not contain more than 5000 items

Basically we need to clear our warehouse of women's materials first then men's. So women's is first to be loaded on the truck. Truck only can hold about 5000 units. So once we clear all the women's then we can focus on men. As far as material goes it could be in any order as long as we group women first then men and so forth. Also, if we are completely done with women then we can fill the truck with men's materials to equal 5000 units.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top