ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Solver: Can't add constraints when they are above/below certain va (https://www.excelbanter.com/excel-programming/381791-solver-cant-add-constraints-when-they-above-below-certain-va.html)

ck

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?


All times are GMT +1. The time now is 09:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com