Closed Thread
Results 1 to 2 of 2

Help with Solver!!!

  1. #1
    Registered User
    Join Date
    05-03-2020
    Location
    Menlo Park, CA
    MS-Off Ver
    2019
    Posts
    4

    Help with Solver!!!

    Hi, I'm trying to make a Solver function to MAXIMIZE the amount of total return on a stock portfolio. It needs to satisfy the following constraints:

    Condition 1: Additional shares can be bought only in “Health Care” Companies in the portfolio.
    Condition 2: The maximum number of additional shares in each “Health Care” company in the
    portfolio that can be bought is 250
    Condition 3: Fractional shares cannot be bought.
    Condition 4: The total additional money available (The sum of money paid for additional shares in
    Health Care companies) for investment is $60,000.

    I've set this up in Solver like this:

    $D$4:$D$36 = $Y$6 ((D4:D36 is the specification of the industry for each stock)) ((Y6 = Health Care))

    $T$4:$T$36 <= $Y$7 ((T4:T36 is the blank range of cells I've set up for the additional shares to be purchased)) ((Y7 = "250))

    $T$4:$T$36 = integer

    $T$4:$T$36 >= 0

    $X$38 = 60000 (X38 is the total sum of 60,000 that I can spend to purchase additional shares)


    I keep getting the same error that says "Variable bounds conflict in Binary or AllDifferent Constraint"

    PLEASE HELP!!!!!!!!!

  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
    52,929

    Re: Help with Solver!!!

    Do not post duplicate threads
    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. Replies: 7
    Last Post: 12-31-2016, 12:29 PM
  2. Replies: 1
    Last Post: 04-27-2016, 03:05 PM
  3. Replies: 0
    Last Post: 07-20-2014, 12:45 PM
  4. macro not keeping solver solutions when solver is successful
    By jimmypants in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2014, 01:45 AM
  5. Replies: 6
    Last Post: 05-18-2013, 05:49 AM
  6. Can't start Solver. Error message says Solver.xlam already open.
    By DaveHills in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 10-21-2012, 11:02 AM
  7. solver macro + simulation code + not updating solver values
    By sabinemaria in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 11:37 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