+ Reply to Thread
Results 1 to 2 of 2

Function for finding SUM combinations

  1. #1
    Registered User
    Join Date
    10-14-2014
    Location
    Amstedam
    MS-Off Ver
    2010
    Posts
    1

    Function for finding SUM combinations

    Hi guys,

    I was wondering wether there is a function in Excel which does the following. Let's say we have number 56,586.45. I got a list of about 1,000 numbers and I want to know which combinations of numbers add up to the exact amount of 56,586.45. If that function exists, is it also possible to add criteria like the maximum amount of numbers in such a combination? Help would be much appreciated.

    Greetings,

    Kasper

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Function for finding SUM combinations

    I would not say that there is a single "function" that does this, but a spreadsheet can be programmed to perform this task. Here's how I usually see it set up:

    1) Enter your list of numbers in a column
    2) Adjacent to this column, enter a list of 1's and 0's. This column will be our "toggle" for including a specific value in the sum.
    3) Use the =SUMPRODUCT() function to sum the product of these two columns: http://office.microsoft.com/en-us/ex...in=HP010342656
    4) Call Solver. Tell it to set the SUMPRODUCT() cell to the desired value by changing the column of 1's and 0's subject to the constraint that the column of 1's and 0's are binary.
    5) To add a constraint that it should only use a certain number of entries, add a cell that sums the column of 1's and 0's (=SUM() function), then add a constraint that this cell should be less than or equal to the desired number of entries.
    5) Wait for Solver to find a solution, or decide it is taking too long, or decide that it cannot find a solution.

    You will need to recognize that the success rate for this will often be mixed. On the one hand, with 1000 entries to choose from, there are untold millions of possible combinations that Solver will need to try before it decides a solution has been found. Even if a solution exists, it could take some time for it to find a solution. There will also be the question of any possible solution or a specific solution when multiple possible solutions exist. Also the question of will a solution exist at all and how long to you let it try before it should just give up and say there is no solution.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. Finding combinations of 8 letters
    By macaonghus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2015, 02:20 AM
  2. Finding unique combinations across 3 columns using a function
    By Hdim in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-31-2013, 07:17 AM
  3. VBA - Finding unique combinations
    By xlsnovice in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-30-2013, 10:32 AM
  4. Finding possible combinations & listing the wanted combinations
    By Zoke in forum Excel Programming / VBA / Macros
    Replies: 30
    Last Post: 07-16-2012, 03:41 PM
  5. Finding combinations that add up to X
    By mj6987 in forum Excel General
    Replies: 4
    Last Post: 04-07-2006, 07:20 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