+ Reply to Thread
Results 1 to 2 of 2

find best combination

  1. #1
    Registered User
    Join Date
    03-20-2010
    Location
    Israel
    MS-Off Ver
    Excel 2007
    Posts
    1

    find best combination

    Hi,

    I'm looking for an algorithm that can calculate all possible combinations from a list of numbers that fits a target number. For example:
    The numbers are stored in column A. Each number has price stores in column B.
    ## A B
    1 1 9$
    2 5 12$
    3 2 4$
    4 3 3$
    5 4 2$
    6 7 5$
    Target Value: 10

    Required answers: 2*A2 or A1+A2+A5 or 5*A3 or 2*A5+A3 and so on...
    Than, it should chose the profitable combination. For example:
    2*A2 24$
    A1+A2+A5 23$
    5*A3 20$
    2*A5+A3 8$

    Therefore, 2*A5+A3 is the profitable combination...

    I'd be grateful to your help!!!

    Thanks,
    Oren

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: find best combination

    orenw8,

    Welcome to the Excel Forum.

    See:

    Find multiple combinations in a list that adds up to a certain value?
    http://www.tushar-mehta.com/excel/te...e_combinations
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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