New Member
June 12, 2020
Dear Friends,
I would like to get your suggestions to solve the following problem by using M Code or power query.
How to pack the items of Table 1 in minimum number of carton subject to
1. Total weight in a carton should be max of 25 kgs.
2. In a caton max 5 items can be inluded.
3.The final table to be sorted from smallest to largest based on Pack No.
Thanks
JP
October 5, 2010
Hi JP,
Power Query isn't really the tool for this. This is an optimization problem you should do in Excel.
It's not clear if this is a one off problem or something you'll do ongoing?
As a one off you can do it 'manually', I've come up with a different solution to you but the same number of packs - see attached.
Why does a table of results have to be sorted? Sounds like something you;d be asked to do for homework???
Regards
Phil
New Member
June 12, 2020
Dear Phil,
Thanks for your reply on my topic.
Actually I given a simple table to get a solution. This is one of the requirement of a project , which I am working on.
The data in the table will vary and some time , it will go up to 50 items. I want to automate the process of making the packs with max 25 KG & with max 5 items. In fact I got a solution by using formulas ( aggregate & Index) which is quite long and difficult to trace the mistakes. I thought with power query, the solution may be simpler & easy to automate.
Pl let me know, your solution. Some body told me that by using solver, solutions can be made.
Any way I am using Excel 2016 with out power pivot.
Looking for your reply.
Thanks
Jp
1 Guest(s)