+ Reply to Thread
Results 1 to 17 of 17

Formula to bundle

  1. #1
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Formula to bundle

    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
    Attached Files Attached Files
    Last edited by andi1987uk; 02-26-2020 at 09:09 AM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula to bundle

    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

  3. #3
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Re: Formula to bundle

    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 :-)

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula to bundle

    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

  5. #5
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16
    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

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula to bundle

    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.

  7. #7
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Formula to bundle

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

  8. #8
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Re: Formula to bundle

    That works perfectly, thanks very much :-)

  9. #9
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Re: Formula to bundle

    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

  10. #10
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Re: Formula to bundle

    Also how do I revert this back to "unsolved" :-D

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Formula to bundle

    Select Thread Tools from the menu link above and mark this thread as unSOLVED.

  12. #12
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Re: Formula to bundle

    Ok marked as unsolved hopefully someone can help

  13. #13
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,830

    Re: Formula to bundle

    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

  14. #14
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Re: Formula to bundle

    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

  15. #15
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Re: Formula to bundle

    Anyone have any idea’s?

  16. #16
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,830

    Re: Formula to bundle

    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.

  17. #17
    Registered User
    Join Date
    02-25-2020
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    16

    Re: Formula to bundle

    Hi Greg,

    Happy to wait :-)

    Thanks for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 03-02-2019, 02:01 PM
  2. Optimization - Calculate bundle offering highest USD amount
    By KasperMikkelsen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2017, 04:34 PM
  3. Generating equation for a parabola bundle
    By PaulLag in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2015, 12:42 PM
  4. Macro to take a screenshot and bundle into body of Outlook
    By olsska in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-23-2013, 04:22 PM
  5. [SOLVED] Extract a few values from several .csv-files and bundle them in a single output-file
    By Jeroen606 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2013, 01:05 AM
  6. Bundle Lookup with Calculation & Script
    By pr4t3ek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2012, 11:21 PM
  7. [SOLVED] Bundle values
    By Tobbe in forum Excel General
    Replies: 4
    Last Post: 08-14-2012, 04:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1