+ Reply to Thread
Results 1 to 6 of 6

Find the Combination of different Lenth

  1. #1
    Registered User
    Join Date
    10-13-2012
    Location
    Sharjah, UAE
    MS-Off Ver
    Excel 2007
    Posts
    25

    Find the Combination of different Lenth

    Hi Friends,
    I have plates with different length of 700mm, 1000 mm and 1200 mm which i can fix continually. if i required to fix "n" meter i would like to know how many plates required in combination of 700,1000 and 1200. for example: 1) if i required 7 meter, then i can calculate 5 nos of 1200 mm and 1 no of 1000 mm, 2) suppose i required 6.5 meters then i can use 4 Nos of 1200 mm, 1 no of 1000 mm and 1 no of 700 mm.
    if the "n" matching different combinations then we can use the lengthiest plates more. for example: if "n" = 6 meter, then either we can use 5 nos of 1200 mm or 6 nos of 1000 mm, here we want to use 5 nos of 1200mm.
    i hope the above is explained my problem. somebody can send me the solution please.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Find the Combination of different Lenth

    maybe the solver can help you with your problem.

    Excel 2007 => data => solver
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    10-13-2012
    Location
    Sharjah, UAE
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find the Combination of different Lenth

    i want a Vb code, please help me.

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Find the Combination of different Lenth

    i want a Vb code
    Strange as solver can so easily give you what you wish for. See Solver_min1.pgn and Solver_min2.pgn

    Alf
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    10-13-2012
    Location
    Sharjah, UAE
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find the Combination of different Lenth

    actually this i want to incorporate with my existing macro and do some more exercise on it. that is the reason i requested to do in vb.

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Find the Combination of different Lenth

    Perhaps this could be of help to you then. Test by running macro "Run_Solver"

    You must have Solver installed as oelder suggested and you must also set a reference to solver in the "Microsoft Visual Basic" window i.e Tools-> Reference and tick box marked "Solver".

    Alf
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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