+ Reply to Thread
Results 1 to 2 of 2

EXCEL SOLVER-how to get all combination results for a desired sum

  1. #1
    Registered User
    Join Date
    06-29-2015
    Location
    Dubai
    MS-Off Ver
    2013
    Posts
    24

    EXCEL SOLVER-how to get all combination results for a desired sum

    Good Day

    Dear team
    Attached excel sheet "Solver-1" . I have a list of invoice values in column 1,I add a helper column in B.
    I applied sumproduct formula in cell B53 as " =SUMPRODUCT(A19:A52,B19:B52) "
    I set desired Set objective $B$53 to the value i want .(here eg:165, which is the amount paid by customerr, but i dont that information from customer which invoices were paid). So i try to get it solved by using SOLVER by applying .My changing cells are $B$19:$B$52 and my contraints are
    1) $B$19:$B$52=BINARY
    2) $B$19:$B$52=Integer
    I opt Simplex LP to get it solved

    I always got the result as the sum is a combination of A31 Value 21 + A36 value 91 + A52 Value 53

    But i have another combination of A21 Value 79 + A26 Value 65 + A31 Value 21 to give same result 165

    This is get only because the figures are small and list is short. How can i get all the possible combinations of value that may lead to result 165
    Name:  1-1.jpg
Views: 745
Size:  65.9 KB

    Thanks and regards

    Jayaraj
    Attached Files Attached Files

  2. #2
    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: EXCEL SOLVER-how to get all combination results for a desired sum

    Solver will only give you one combination to match a given number with a number of values. This link to tushar mehta have a VBA macro that will show all possible combinationas.

    http://www.tushar-mehta.com/excel/te...ues/index.html

    After imput from member I had to reenter link as the previous one did not work. Thanks doc.

    Alf
    Last edited by Alf; 05-22-2019 at 09:45 AM.

+ 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: 0
    Last Post: 09-12-2018, 10:42 AM
  2. Excel Combination Solver for Determining Shortest Route
    By excelcombinations in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2017, 08:24 AM
  3. Solver - Best method/options possible to get desired result
    By Tombo746 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-20-2017, 06:27 PM
  4. [SOLVED] List of pair combination with desired condition
    By fatwa.amanu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2014, 04:29 AM
  5. [SOLVED] Solver add in not delivering desired function
    By mkmed in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-05-2013, 10:10 AM
  6. Replies: 0
    Last Post: 02-20-2012, 07:11 PM
  7. Combination of Numbers Totalling Desired Sum
    By contra19 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-07-2010, 09:07 AM

Tags for this Thread

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