+ Reply to Thread
Results 1 to 3 of 3

How do I use solver to find which cells add up to a certain amoun.

  1. #1
    Joe S
    Guest

    How do I use solver to find which cells add up to a certain amoun.

    I know that you can use sumproduct to do it, but forgot how.

  2. #2
    Ken Wright
    Guest

    Re: How do I use solver to find which cells add up to a certain amoun.

    If you are looking for a solution (Not necessarily the only one) to a subset
    of a group of numbers that will add up to a target number, then this can be
    done quite simply with Solver.

    Assuming range of numbers in A1:A30, add a set of 0s in B1:B30 and in say
    B31 put

    =SUMPRODUCT(A1:A30*B1:B30)

    Now do Tools / Solver / Set Target Cell 'B31' to 'value of' and put in your
    target number. Then, using the range selector under the 'By Changing cells'
    section, select cells B1:B30 as the ones to change and hit enter which will
    take you back to the first dialog box. Now hit the 'Add' button, and add
    the constraint that B1:B30 must be 'bin' (Means binary as in 1 or 0, and
    it's one of the dropdowns, so just hit the arrow and select 'bin') and just
    hit Solve. You MUST ensure that in this example, when you add the 'bin'
    constraint range, you do not inadvertantly include the formula cell B31,
    else you will get an error message such as 'Binary Constraint cell reference
    must include only adjustable cells'

    --
    Regards
    Ken....................... Microsoft MVP - Excel
    Sys Spec - Win XP Pro / XL 97/00/02/03

    ----------------------------------------------------------------------------
    It's easier to beg forgiveness than ask permission :-)
    ----------------------------------------------------------------------------

    "Joe S" <Joe [email protected]> wrote in message
    news:[email protected]...
    > I know that you can use sumproduct to do it, but forgot how.




  3. #3
    Tushar Mehta
    Guest

    Re: How do I use solver to find which cells add up to a certain amoun.

    Check
    Find a set of amounts that match a target value
    http://www.tushar-mehta.com/excel/ti...set-match.html

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>, "=?
    Utf-8?B?Sm9lIFM=?=" <Joe [email protected]> says...
    > I know that you can use sumproduct to do it, but forgot how.
    >


+ 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