Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem Excel - řešitel skrze VBA

Zapsal jsem to takto, ale hlásí mi "Chyba modelu...".

Sub resitel()
'
' resitel Makro
'

'
SolverReset
SolverOk SetCell:="$R$31", MaxMinVal:=3, ValueOf:=Range("M16"), ByChange:= _
"$N$2:$N$14"
SolverAdd CellRef:="$V$3", Relation:=1, FormulaText:="$W$2"
SolverAdd CellRef:="$V$4", Relation:=1, FormulaText:="$W$3"
SolverAdd CellRef:="$V$5", Relation:=1, FormulaText:="$W$4"
SolverAdd CellRef:="$V$6", Relation:=1, FormulaText:="$W$5"
SolverAdd CellRef:="$V$7", Relation:=1, FormulaText:="$W$6"
SolverAdd CellRef:="$V$8", Relation:=1, FormulaText:="$W$7"
SolverAdd CellRef:="$V$9", Relation:=1, FormulaText:="$W$8"
SolverAdd CellRef:="$V$10", Relation:=1, FormulaText:="$W$9"
SolverAdd CellRef:="$V$11", Relation:=1, FormulaText:="$W$10"
SolverAdd CellRef:="$V$12", Relation:=1, FormulaText:="$W$11"
SolverAdd CellRef:="$V$13", Relation:=1, FormulaText:="$W$12"
SolverAdd CellRef:="$V$14", Relation:=1, FormulaText:="$W$13"
SolverAdd CellRef:="$R$18", Relation:=1, FormulaText:="$AB$2*$AC$2"
SolverAdd CellRef:="$R$19", Relation:=1, FormulaText:="$AB$3*$AC$2"
SolverAdd CellRef:="$R$20", Relation:=1, FormulaText:="$AB$4*$AC$2"
SolverAdd CellRef:="$R$21", Relation:=1, FormulaText:="$AB$5*$AC$2"
SolverAdd CellRef:="$R$22", Relation:=1, FormulaText:="$AB$6*$AC$2"
SolverAdd CellRef:="$R$23", Relation:=1, FormulaText:="$AB$7*$AC$2"
SolverAdd CellRef:="$R$24", Relation:=1, FormulaText:="$AB$8*$AC$2"
SolverAdd CellRef:="$R$25", Relation:=1, FormulaText:="$AB$9*$AC$2"
SolverAdd CellRef:="$R$26", Relation:=1, FormulaText:="$AB$10*$AC$2"
SolverAdd CellRef:="$R$27", Relation:=1, FormulaText:="$AB$11*$AC$2"
SolverAdd CellRef:="$R$28", Relation:=1, FormulaText:="$AB$12*$AC$2"
SolverAdd CellRef:="$R$29", Relation:=1, FormulaText:="$AB$13*$AC$2"
SolverAdd CellRef:="$R$30", Relation:=1, FormulaText:="$AB$14*$AC$2"
SolverOk SetCell:="$R$31", MaxMinVal:=3, ValueOf:=Range("M16"), ByChange:= _
"$N$2:$N$14"
SolverSolve
End Sub

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny