Closed Thread
Results 1 to 7 of 7

Excel Solver Help!

  1. #1
    Registered User
    Join Date
    02-15-2009
    Location
    Hagerstown, Maryland, United States of America
    MS-Off Ver
    MS 2007
    Posts
    5

    Excel Solver Help!

    I'm new to the forum and joined because I will be using excel alot in my college courses over the next few years.

    This is an optimization problem in one of my text books. I attached the file as well as a screen shot.

    My "Objective" is to maximize profit per box of books that are shipped. The cell reference for the objective is H11.

    My "Decision Variables" are F5:F10 ( Number of books in a box by any particular author.)

    The problem is with my "Constraints" and how to enter them into Solver.
    They are:
    1. Each box must contain 20 books or less.
    2. At least three different authors in the box.
    3. Between 4 and 8 books from the authors you have in the box.
    4. The total weight of the box must be 50 pounds or less.

    This is a screen shot and there is also an xls. attachment.
    \1

    I particularly need help with constraints 2 and 3. I would appreciate your feedback.

    Thanks
    Justin
    Attached Files Attached Files
    Last edited by RAISETOWIN; 02-15-2009 at 05:34 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Excel Solver Help!

    Suggest that you set up a cell containing a COUNTIF formula to count how many cells in the book count range are zero. If you have a minimum of three different authors, then this gives you a maximum of three zeros.

    Similary you need to a count of the number of cells in the book count range of greater than or equal to 4 to be three or greater.

    You also need to specify the number of books as an integer.

    Hope this helps.

  3. #3
    Registered User
    Join Date
    02-15-2009
    Location
    Hagerstown, Maryland, United States of America
    MS-Off Ver
    MS 2007
    Posts
    5

    Re: Excel Solver Help!

    Quote Originally Posted by mrice View Post
    Suggest that you set up a cell containing a COUNTIF formula to count how many cells in the book count range are zero. If you have a minimum of three different authors, then this gives you a maximum of three zeros.

    Similary you need to a count of the number of cells in the book count range of greater than or equal to 4 to be three or greater.

    You also need to specify the number of books as an integer.

    Hope this helps.
    OK the first idea definately helped. Now I can use that cell as a constraint.
    But I dont understand how your second idea is going to garauntee that the authors that are used will have between 4 and 8 books in the box. Could you elaborate.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Excel Solver Help!

    If you set up a formula which sums the countif's for zeros and for >= 4 then this should have a value of 6.

  5. #5
    Registered User
    Join Date
    10-31-2010
    Location
    Smithfield, RI
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Excel Solver Help!

    Hello. I am experiencing the same problem as Justin. I have the same case, but also the same problem. I am able to use solver to get a solution, unless I use the COUNTIF function. If I use COUNTIF as suggested, solver tells me that it is unable to find a feasible solution. I have googled around some more, and I've seen at least one person say that COUNTIF may not be used in a cell used as a constraint. Help, please!

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Excel Solver Help!

    Welcome to the forum, dogfood. Smithfield is my favorite ham, and almost (Newport) my hometown.

    Please take a few minutes to read the forum rules, and then start your own thread.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Excel Solver Help!

    Some hints.

    The range "F5:F10" must have a integer constraint as you don't put part of books in a box.

    Add a range say "J5:J10" and set a binary constraint on this range. The sum of this range "J11" should be => 3 (a mimum of 3 authors in each box)

    HTH

    Alf

Closed 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