Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Flags from Solver used in VBA
I am running some VBA that uses Solver in a loop for a series of scenarios
related to a particular problem (i.e. up to 500). While the program runs from start to finish with no problems, I have realised on viewing the results that in some of the scenarios, Solver was unable to find a feasible solution. Rather than having to go through each line one by one like this, or to have to print out 400 Answer Reports, is there a way that Solver can return a flag e.g. 1 vs 0, TRUE or FALSE, etc to indicate whether each iteration has terminated with a feasible solution or not? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Flags from Solver used in VBA
Newton86 -
Try something like this (untested): Dim SolverResult As Integer SolverResult = SolverSolve(UserFinish:=True) Then, if SolverResult is zero or one or two, everything was OK. Four means it didn't converge. Five means there are no feasible solutions. - Mike www.mikemiddleton.com "Newton86" wrote in message ... I am running some VBA that uses Solver in a loop for a series of scenarios related to a particular problem (i.e. up to 500). While the program runs from start to finish with no problems, I have realised on viewing the results that in some of the scenarios, Solver was unable to find a feasible solution. Rather than having to go through each line one by one like this, or to have to print out 400 Answer Reports, is there a way that Solver can return a flag e.g. 1 vs 0, TRUE or FALSE, etc to indicate whether each iteration has terminated with a feasible solution or not? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Flags from Solver used in VBA
Frontline Systems has redone their web site, so I can't find anything. But here's a
partial list of the SolverSolve results: http://www.solver.com/suppstdmsgresult.htm - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Michael R Middleton wrote: Newton86 - Try something like this (untested): Dim SolverResult As Integer SolverResult = SolverSolve(UserFinish:=True) Then, if SolverResult is zero or one or two, everything was OK. Four means it didn't converge. Five means there are no feasible solutions. - Mike www.mikemiddleton.com "Newton86" wrote in message ... I am running some VBA that uses Solver in a loop for a series of scenarios related to a particular problem (i.e. up to 500). While the program runs from start to finish with no problems, I have realised on viewing the results that in some of the scenarios, Solver was unable to find a feasible solution. Rather than having to go through each line one by one like this, or to have to print out 400 Answer Reports, is there a way that Solver can return a flag e.g. 1 vs 0, TRUE or FALSE, etc to indicate whether each iteration has terminated with a feasible solution or not? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel flags cells | Excel Discussion (Misc queries) | |||
How to get =MIN() given flags? | Excel Worksheet Functions | |||
Can a "flags" or "reminders" be used in a ws | New Users to Excel | |||
Interesting Solver problem (Solver encounters an error) | Excel Discussion (Misc queries) | |||
Resetting Solver Manually to Fix Solver Bug | Excel Programming |