![]() |
Solver
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 -- David |
All times are GMT +1. The time now is 03:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com