Solver

D

David

Hi Group,

I am having a hard time programming Solver. This is the code I have so far:
Sub SolveNew()
Worksheets(ActiveSheet.Name).Activate
SolverReset
SolverOptions precision:=0.001
SolverOk SetCell:="$C$48", MaxMinVal:=3, ValueOf:="100000", ByChange:= _
"$C$32,$C$34,$C$36,$C$38,$C$40,$C$42,$C$44"
SolverAdd CellRef:="$C$33", Relation:=2, FormulaText:="$C$35"
SolverAdd CellRef:="$C$35", Relation:=2, FormulaText:="$C$37"
SolverAdd CellRef:="$C$37", Relation:=2, FormulaText:="$C$39"
SolverAdd CellRef:="$C$41", Relation:=2, FormulaText:="$C$43"
SolverAdd CellRef:="$C$43", Relation:=2, FormulaText:="$C$45"
SolverAdd CellRef:="$C$49", Relation:=2, FormulaText:="$C$48*0.35"
SolverAdd CellRef:="$C$50", Relation:=2, FormulaText:="$C$49*0.25"
SolverOk SetCell:="$C$48", MaxMinVal:=3, ValueOf:="100000", ByChange:= _
"$C$32,$C$34,$C$36,$C$38,$C$40,$C$42,$C$44"
SolverSolve
End Sub

I know there is a solution, but it keeps telling me there is not a solution.

Thanks,
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top