LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automating Solver in loop


Hello:
I am trying to use the SOlverOK module ina loop ina macro and I am no
able to reset the cosntraint set. Code I am using is below. PLEAS
HELP!!
thanks
msuryexcel
****
For j = 2 To numdates - k1
rj = rk + j
ri = rj - 500
riold = ri - 1
Range(col3 & rj).Select
SolverOk SetCell:=col3 & rj, MaxMinVal:=2, ValueOf:="0"
ByChange:= _
"$E$" & ri & ":$AA$" & ri
SolverDelete CellRef:="$AC$" & riold, Relation:=2
FormulaText:="1"
SolverAdd CellRef:="$AC$" & ri, Relation:=2, FormulaText:="1"
SolverOk SetCell:=col3 & rj, MaxMinVal:=2, ValueOf:="0"
ByChange:= _
"$E$" & ri & ":$AA$" & ri
SolverDelete CellRef:="$E$" & riold & ":$AA$" & riold
Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$E$" & ri & ":$AA$" & ri, Relation:=3
FormulaText:="0"""

SolverOk SetCell:=col3 & rj, MaxMinVal:=2, ValueOf:="0"
ByChange:= _
"$E$" & ri & ":$AA$" & ri
SolverSolve

Next j
***

--
msuryexce
-----------------------------------------------------------------------
msuryexcel's Profile: http://www.excelforum.com/member.php...fo&userid=2816
View this thread: http://www.excelforum.com/showthread.php?threadid=47684

 
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
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM
Error message when using the Solver in a VBA macro loop Mathieu Fournier Excel Programming 2 March 1st 05 02:36 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 01:46 PM.

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

About Us

"It's about Microsoft Excel"