View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ck ck is offline
external usenet poster
 
Posts: 52
Default Solver: Can't add constraints when they are above/below certain va

Hi, I am writing a VBA code in attempt to find some optimal values within
certain boundaries. To do this, I call Solver in VBA and add the constraints
using the following code:

SolverAdd CellRef:=Range("beta").Address, Relation:=1,
FormulaText:="UpperBound"
SolverAdd CellRef:=Range("beta").Address, Relation:=3,
FormulaText:="LowerBound"

where "LowerBound" and "UpperBound" refers to two cells containing the
boundaries.

The interesting thing is, when the LowerBound (or Upperbound) is below (or
above) certain value, then the constraint is not added into Solver.

Does anyone have any idea why this happens?