+ Reply to Thread
Results 1 to 2 of 2

Conditional Targets

  1. #1
    Registered User
    Join Date
    11-24-2010
    Location
    NYC
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    1

    Conditional Targets

    I have a question for this fine web establishment.

    I have a column of numbers that I need to find out if when added to either other they equal a set amount.

    Example
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    Target Number: 9
    So in this example Row 4 + Row 5 would equal 9, and Row 9 would equal 9.

    Is there a way in excel to either highlight the cells that equal the target or create new rows where all the combinations could equal the Target (In the example two possibilities for the target to exist).

    I am doing this manually right now and it is quite time consuming when the spreadsheets get quite large. If you can provide any assistance I would be quite grateful.

    Thanks.

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581

    Re: Conditional Targets

    The actual terminology for this sort of problem is Subset Sum. The reason I'm mentioning that is you may wish to look it up. It will generally require a VBA based solution to even have a reasonable chance at an answer.

    Depending on how many numbers you have, this problem is exceedingly difficult and may not be possible to do.

    If you know of some limits/implicit conditions to the data you're using, it may be possible to find something that would be manageable -- but if you have no limits, there really is no efficient solution. If your data has really low complexity, it may be possible to do something in the spreadsheet itself.

    The Solver could potentially be used to find one possible answer -- I don't use it much though so can't state what would be most reliable in terms of setup.

    S

+ 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