Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel flags cells Chadersmith Excel Discussion (Misc queries) 1 August 5th 09 05:08 PM
How to get =MIN() given flags? Tetsuya Oguma Excel Worksheet Functions 3 November 23rd 06 05:59 PM
Can a "flags" or "reminders" be used in a ws gidawie1 New Users to Excel 2 January 13th 06 02:16 PM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
Resetting Solver Manually to Fix Solver Bug Stratuser Excel Programming 0 September 13th 04 07:04 PM


All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"