+ Reply to Thread
Results 1 to 2 of 2

Solver - Finding the next best solution

Hybrid View

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    14

    Solver - Finding the next best solution

    I have a spreadsheet set up where I have a number in cell S6 and I run solver to find the maximum value for S6, which is the best solution. I'd like to also find the 2nd best, 3rd best, 4th best, nth best solution. Right now to do this I added a constraint of S6<=T6 where T6 is S6 minus 0.001. I have to copy and paste the value of S6-0.001 into T6 because if I just put in "=S6-0.001" into T6 it will never find a solution of course. Then I hit solve and repeat the process. Is there a more efficient way to do this?
    Last edited by mattdh12; 04-03-2014 at 06:48 PM.

  2. #2
    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: Solver - Finding the next best solution

    You could run run solver in a loop using VBA something like

    Sub LoopSolver()
    Dim i As Integer
    
    For i = 1 To 10
    
    ' Put your solver marco here
    
    Range("T6") = Range("T6") - 0.001
    
    Next
    
    End Sub
    To run solver using VBA you must set a refence to solver "Visual Basic" -> "Tools" -> "References" find and tick box marked "Solver"

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 10-30-2013, 02:11 PM
  2. solver - not always optimal solution ?
    By przemke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-07-2009, 03:38 PM
  3. Solution With Solver
    By Kumara_faith in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-31-2007, 08:00 AM
  4. Solver: no solution
    By Peter1999 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2007, 03:57 AM
  5. Solver solution hessian
    By PandS in forum Excel General
    Replies: 0
    Last Post: 02-01-2006, 11:10 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