Solver dynamisch automatisieren
02.07.2020 10:23:16
LosWochitos1
Sub Solver()
Dim i As Long
Dim maxCount As Long
maxCount = ActiveSheet.Cells(Rows.Count, 5).End(xlUp).Row
For i = 15 To maxCount
SolverReset
SolverOk SetCell:="$BH$" & i, MaxMinVal:=2, ValueOf:=0, ByChange:="$Q$:$W$" & i, _
Engine:=1, EngineDesc:="GRG Nonlinear"
SolverAdd CellRef:="$AL$" & i, Relation:=3, FormulaText:="$H$" & i
SolverAdd CellRef:="$AT$" & i, Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$X$" & i, Relation:=3, FormulaText:="0"
SolverSolve UserFinish:=True
Next i
End Sub
Leider funktioniert das Ganze noch nicht.
Vielen Dank für alle hilfreichen Beiträge und viele Grüße
Anzeige