View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Markus Scheible[_2_] Markus Scheible[_2_] is offline
external usenet poster
 
Posts: 95
Default Interacting with EXCEL Solver via macro

Hi Dean,


SolverOk SetCell:="$M$62", MaxMinVal:=3,

ValueOf:="1922750",
ByChange:="$I$62"
SolverSolve
End Sub



try using ValueOf:=range("N62").Value

this should get the content of cell N62 as the valueof
from SOLVER...

Have a nice day!

Markus

Though the above request would be good enough, the "value

of" that I will
want to set it to is always the result of a formula that

is in another
specific cell, one to the right of the target cell, in

this case, cell
$N$62. If there was a way to have the macro find that

formula's value and
type that formula's value into the solver "value of" box

itself, that would
be even better, as there would be no manual intervention.

Can anyone help me with the first, if not (even better)

the 2nd approach?

Thanks much!
Dean


.