Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I tried to estimate two parameters using Excel Solver. And it is really odd that I got a solution but the constaints are not satisfied. Here is the VBA code: ........... 'initialize parameters Sheets("abc").Cells(3, 11) = 0.2 Sheets("abc").Cells(4, 11) = 0.5 ' next, set $k$5=$k$3+$k$4 Sheets("abc").Cells(5, 11) = Sheets("abc").Cells(3, 11) _ + Sheets("abc").Cells(4, 11) Sub solver_v2() SolverReset SolverOk SetCell:="$M$446", MaxMinVal:=1, ValueOf:="0", ByChange:="$K$3:$K$5" SolverAdd CellRef:="$K$3", Relation:=3, FormulaText:="0" SolverAdd CellRef:="$K$3", Relation:=1, FormulaText:="1" SolverAdd CellRef:="$K$4", Relation:=3, FormulaText:="0" SolverAdd CellRef:="$K$4", Relation:=1, FormulaText:="1" SolverAdd CellRef:="$k$5", Relation:=1, FormulaText:="1" SolverOk SetCell:="$M$446", MaxMinVal:=1, ValueOf:="0", ByChange:="$K$3:$K$5" SolverSolve UserFinish:=True SolverFinish KeepFinal:=1 End Sub The final estimate for $k$5 is beyond 1. Can anybody help me with that? Thanks a lot! Lily |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
countif and sum if if two condition are satisfied | Excel Worksheet Functions | |||
Looping till condition is satisfied? | Excel Worksheet Functions | |||
how to create constaints in solver | Excel Worksheet Functions | |||
Deletion of rows where a value is satisfied | Excel Programming | |||
Deletion of rows where a value is satisfied | Excel Worksheet Functions |