Closed Thread
Results 1 to 1 of 1

Combination help

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

    Combination help

    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 (http://www.tushar-mehta.com/excel/te.../match_values/) 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.

    Any help would be appreciated!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Combination help

    Forum-induced duplicate thread. I am closing this 1, continue on the other thread
    Thanks
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Combination
    By Hishamullah in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-08-2015, 08:12 PM
  2. [SOLVED] how many cell in a row that contain certain combination from a larger combination
    By system in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 11-17-2012, 03:04 PM
  3. all combination
    By fulldeen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2012, 11:15 PM
  4. Name Combination
    By sweetthing4luc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-17-2009, 01:08 PM
  5. combination
    By RobcPettit@yahoo.co.uk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2006, 04:35 AM
  6. [SOLVED] combination
    By deco in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 02:05 PM

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