Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
solver ranges
I would like to use solver for equations in certain locations in a sheet. To
do this I would like to pass the activerow to the solver arguments. I was able to do something similar in GoalSeek but it doesn't work in Solver. Here's my code activerow = ActiveCell.Row SolverOk SetCell:=Cells(activerow, 14), MaxMinVal:=3, ValueOf:="0", ByChange:=Cells(activerow, 12) I'm not sure I understand why this doesn't work but hopefully there's a simple solution Any help is appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
solver ranges
Try this:
SolverOk SetCell:=Cells(ActiveCell.Row, 14).Address, MaxMinVal:=3, ValueOf:="0", ByChange:=Cells(ActiveCell.Row, 12).Address Also, is SOLVER checked at Tools | References? Hth, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
solver ranges
Hi. Double check...
http://support.microsoft.com/kb/213689/en-us One option... Sub Demo() Dim R As Long 'Row 'If you wish... SolverOptions Precision:=0.000000001 SolverOptions Convergence:=0.000000001 R = ActiveCell.Row SolverOk Cells(R, 14), 3, 0, Cells(R, 12) SolverSolve True '<-- Run Solver End Sub -- HTH :) Dana DeLouis Windows XP & Office 2003 "blenno" wrote in message ... I would like to use solver for equations in certain locations in a sheet. To do this I would like to pass the activerow to the solver arguments. I was able to do something similar in GoalSeek but it doesn't work in Solver. Here's my code activerow = ActiveCell.Row SolverOk SetCell:=Cells(activerow, 14), MaxMinVal:=3, ValueOf:="0", ByChange:=Cells(activerow, 12) I'm not sure I understand why this doesn't work but hopefully there's a simple solution Any help is appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Solver with multiple ranges (Excel 2003 sp2) | Excel Programming | |||
Moving ranges as input for Solver | Excel Programming | |||
Interesting Solver problem (Solver encounters an error) | Excel Discussion (Misc queries) | |||
Solver and dynamic ranges | Excel Worksheet Functions | |||
Resetting Solver Manually to Fix Solver Bug | Excel Programming |