Is there a way to solve for a range of cells simultaniously? I need to best fit a curve where I need to set cells $E$14 : $E$417 = $D$14 : $D$417
by changing rows D2 : M2. Here is what I have, is there a way to adjust this code to do a best fit?
Sub BoucwenSOLVER()
For Row = 14 To 417
SolverOk SetCell:=Range("$E$1").offset(row-1,0).Address, MaxMinVal:=3, ValueOf:=Range("$D$1").offset(row-1,0).Value, ByChange:= _
"$D$2:$M$2"
SolverAdd CellRef:="$H$2", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$I$2", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$J$2", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$E$2", Relation:=1, FormulaText:="2"
SolverAdd CellRef:="$E$2", Relation:=3, FormulaText:="1"
SolverSolve
Next
End Sub
by changing rows D2 : M2. Here is what I have, is there a way to adjust this code to do a best fit?
Sub BoucwenSOLVER()
For Row = 14 To 417
SolverOk SetCell:=Range("$E$1").offset(row-1,0).Address, MaxMinVal:=3, ValueOf:=Range("$D$1").offset(row-1,0).Value, ByChange:= _
"$D$2:$M$2"
SolverAdd CellRef:="$H$2", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$I$2", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$J$2", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$E$2", Relation:=1, FormulaText:="2"
SolverAdd CellRef:="$E$2", Relation:=3, FormulaText:="1"
SolverSolve
Next
End Sub