Hey Awesome Excelerators!
Hoping you can help a n00b out here with no VB knowledge at all. Already spun my wheels long enough!!
Been looking at so many forums talking about using VB FOR Loop to run solver multiple times, easily, efficiently, and identify multiple target cells so I hope im on the right track.
Doing this manually only for ONE target cell is a huge headache.. and I have over 200+ in a row within one worksheet.
Target cell at $U$1, but I have targets cells from $U$1 all the way to $U$200.
The variable cells currently consist of only $T$1, $O$1 also to $T$200, $O$200.
I have a constraint where $U$XX must = $E$XX (Also to 200)
Hope someone can show me the way?
SolverOk SetCell:="$U$1", MaxMinVal:=1, ValueOf:=0, ByChange:="$T$1,$O$1", _
Engine:=2, EngineDesc:="Simplex LP"
SolverAdd CellRef:="$U$1", Relation:=2, FormulaText:="$E$1"
SolverAdd CellRef:="$T$1", Relation:=4, FormulaText:="integer"
SolverAdd CellRef:="$O$1", Relation:=4, FormulaText:="integer"
SolverAdd CellRef:="$T$1", Relation:=1, FormulaText:="40"
SolverOk SetCell:="$U$1", MaxMinVal:=1, ValueOf:=0, ByChange:="$T$1,$O$1", _
Engine:=2, EngineDesc:="Simplex LP"
SolverOk SetCell:="$U$1", MaxMinVal:=1, ValueOf:=0, ByChange:="$T$1,$O$1", _
Engine:=2, EngineDesc:="Simplex LP"
SolverSolve
SolverReset
Bookmarks