I need help on how to set up a loop that solves a column of objective cells vs a column of variable cells.
It doesn't matter that type of solver it is, "GRG Nonlinear" seems to work fine.
My objective cells are E7:E207
Where the solution is minimized or =0 because I want a real root.
My variable cells are D7:D207
The variables that it is solving are a cubic equation where it outputs the real root (no imaginary parts). I've looked around the forum but I can't really seem to make much sense. Any help would be much appreciated!
I've made a basic macro so far
Sub Solver()
'
' Solver Macro
'
' Keyboard Shortcut: Ctrl+Shift+S
'
Range("E8").Select
SolverOk SetCell:="$E$7", MaxMinVal:=3, ValueOf:=0, ByChange:="$D$7", Engine:=1 _
, EngineDesc:="GRG Nonlinear"
SolverOk SetCell:="$E$7", MaxMinVal:=3, ValueOf:=0, ByChange:="$D$7", Engine:=1 _
, EngineDesc:="GRG Nonlinear"
SolverSolve
End Sub
tsumannai
Bookmarks