Hi All,
First time poster :-)
I need a formula to help organise quantities of data into bundled coils - see attached.
I hope you can help.
Thanks in advance.
Andi
Hi All,
First time poster :-)
I need a formula to help organise quantities of data into bundled coils - see attached.
I hope you can help.
Thanks in advance.
Andi
Last edited by andi1987uk; 02-26-2020 at 09:09 AM.
Please explain how you are getting to your result. I do not see why "2x600" results in "1x80" or 1x500 results in 2x240.
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
Sorry I probably didn’t explain clearly. In the top row (type 1) example I require 1231m of pipe, however this type of pipe comes in coil quantities of 600m, 200m, 120m or 80m therefore the best bundle combination would be for 2x 600m coils and 1x 80m coil.
Hope that makes more sense :-)
Hello andi1987uk. Welcome to the forum.
It would be simpler to output amounts and sizes as numbers in separate columns.
Is it required that the output be formatted as text like this? (with the 2x 600 for ex.)
I J 2 2x 600 1x 80 3 1x 240 4 3x 240 5 1x 500 2x 240 6 2x 400
Dave
The format of the output isn’t important, more so the ability to automate the bundling. If this can be done using additional cells that is fine.
Thanks
Andrew
This is more challenging than it first appeared. It's going to take me some time.
In the meantime maybe someone will beat me to a solution.
You could use a little VBA:
Please Login or Register to view this content.
let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source
If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE
Walking the tightrope between genius and eejit...
That works perfectly, thanks very much :-)
Hi Olly,
Apologies I know I said it works perfectly but after more use I've noticed the code isn't doing exactly what I need. EG If I have 250 in cell B2 - rather than skipping back the 600 bundle and selecting a 200 then skipping the 120 and also selecting an 80 it just selects 1x 600, which would be too much.
Any other ideas?
Thanks
Andi
Also how do I revert this back to "unsolved" :-D
Select Thread Tools from the menu link above and mark this thread as unSOLVED.
Ok marked as unsolved hopefully someone can help
Question: Let's say your last 2 Bundle Qty's for Type 1 were 130 and 25 and your req. qty was 140. Should the answer be 1x130 and 1x25; or 6x25? The first I only need 2 coils, but I'm 15 over, but the second takes 6 coils but only 10 over.
Also, for your type 3, your Req Qty is 613 and your expected result is 3x240 (720 total). Why not 2x240 and 2x80 (640 total)? And if your answer is that you always want to use the smallest # of coils, then why wouldn't type 4 answer be 2x500 instead of 1x500 and 2x240?
Last edited by Gregb11; 09-06-2020 at 10:57 PM. Reason: adding comments
Hi Greg,
Thanks for having a look :-)
"Let's say your last 2 Bundle Qty's for Type 1 were 130 and 25 and your req. qty was 140. Should the answer be 1x130 and 1x25; or 6x25?" I'm leaning towards this being 6 x 25 therefore the closest to the actual required
"Also, for your type 3, your Req Qty is 613 and your expected result is 3x240 (720 total)." My mistake here, apologies - it should have been as you suggest 2 x 240 & 2 x 80
To give more clarity I'm not looking for the lowest # of coils but more so the closest combination to the required quantity.
Thanks
Andi
Anyone have any idea’s?
This one is complicated I think because of all the combinations that will need to be checked. It will take some time for me to look at it though. Hopefully either someone else can come up with a nice solution or you can wait a little bit - not sure how long I can spend on it or how long it will take me, but I'll try putting some time into it soon.
Hi Greg,
Happy to wait :-)
Thanks for your help
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks