View Single Post
 
Old 06-23-2013, 06:49 PM
ue418 ue418 is offline Windows 7 32bit Office 2000
Novice
 
Join Date: May 2012
Posts: 17
ue418 is on a distinguished road
Default Two ByChange ranges in SetCell command (solver)

I have two noncontiguous ranges in a SetCell, ByChange command for Solver. I am trying the following:

SolverOk SetCell:="$U$" & r, MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$v$" & r & ":$x$" & r, "$L$" & r & ":$q$" & r

where "r" is an integer that I am using for looping. Just assume it is 1 for the moment. So, I have two ranges, columns L thru Q, and columns V thru X. It keeps giving me a "require named parameter" error. I also tried to specify V1, W1 and X1 individually, but no matter what I do, I get that error. Could someone show me the proper syntax when you have two separate ranges in the ByChange region of the SetCell command? Thank you so much.

Rick
Reply With Quote