Closed Thread
Results 1 to 2 of 2

Code for finding combinations

  1. #1
    Registered User
    Join Date
    01-10-2017
    Location
    Canada
    MS-Off Ver
    Excel 2013/2016
    Posts
    4

    Code for finding combinations

    Hi everyone,

    I'm looking for some help regarding creating/modifying code for combinations. I would like to be able to find all possible combinations of X amount of numbers that equal a target sum. I have used Tushar Mehta's code that can be found online and it works great except for the fact it returns all combinations, regardless of how many numbers it takes to equal the target.

    His code allows the user to first enter the desired number of combinations, then the target sum, then a list of numbers used to get to the sum. In my head, I would love one more cell where I can enter exactly how many numbers will be used to equal the target sum.

    Any help would be appreciated!

  2. #2
    Registered User
    Join Date
    01-10-2017
    Location
    Canada
    MS-Off Ver
    Excel 2013/2016
    Posts
    4

    Re: Code for finding combinations

    Mods - please delete this thread if possible. I was having trouble posting earlier but apparently it went through.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help in finding combinations
    By Sravanthi8 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2015, 07:47 AM
  2. Finding combinations of 8 letters
    By macaonghus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2015, 02:20 AM
  3. Function for finding SUM combinations
    By Kasper222 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2014, 11:32 AM
  4. VBA - Finding unique combinations
    By xlsnovice in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-30-2013, 10:32 AM
  5. 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
  6. Finding unique combinations
    By jharaldson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2012, 11:40 AM
  7. Finding combinations that add up to X
    By mj6987 in forum Excel General
    Replies: 4
    Last Post: 04-07-2006, 07:20 AM

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