View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis
 
Posts: n/a
Default Macros involving SOLVER... function

As far as I know I had no reason to enter anything into the SetCell
Section.


I don't think Solver knows by default which cell you are trying to
maximize.
As a side note, when Maximizing, Solver ignores the ValueOf:=0.

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Pixies" wrote in
message ...

Ok I added the reference & tried your other suggestions too.

The Macro seems to be running, but I don't get a solution.

Better explanation of my problem:
A B D
8 Eqn Const. Solution
9 0 62%
10 0 38%

A/B/D Are columns, 8,9,10 the rows.
A9: Formula A (Depending on d9 & 10)
A10: Formula B (Depending on d9 & 10)

Formula A = B9
Formula B = B10

As far as I know I had no reason to enter anything into the SetCell
Section. I edited your suggestion to the following but still no
sucess:

SolverReset
SolverOk SetCell:="", MaxMinVal:=1, ValueOf:="0",
ByChange:="D9:D10"
SolverAdd CellRef:="A9:A10", Relation:=2, FormulaText:="B9:B10"
SolverSolve True
End Sub


--
Pixies
------------------------------------------------------------------------
Pixies's Profile:
http://www.excelforum.com/member.php...o&userid=33642
View this thread: http://www.excelforum.com/showthread...hreadid=534142