Posted to microsoft.public.excel.programming
|
|
VBA loops and Dolver help
I had it set to that to get the refs working rather than introducing lots of
variables at once.
Ah, haven't seen that "& counter" terminology before. Off to try...
"gti_jobert" wrote:
Why are you using a counter from 102 to 102, it will only use the value
102!! Change the counter to the rows you want to change (For Counter =
102 To 500)
Code:
--------------------
For Counter = 102 To 102
SolverOk SetCell:="$N" & counter, MaxMinVal:=2, ValueOf:="0", ByChange:="$O" & counter
SolverAdd CellRef:="$Q" & counter, Relation:=2, FormulaText:="$C$6"
SolverOptions MaxTime:=100, Iterations:=100, Precision:=0.000001,
AssumeLinear _
:=False, StepThru:=False, Estimates:=1, Derivatives:=1,
SearchOption:=1, _
IntTolerance:=0, Scaling:=False, Convergence:=0.0001,
AssumeNonNeg:=True
SolverSolve
Next Counter
End Sub
--------------------
--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=545426
|