solver ranges

  • Thread starter Thread starter blenno
  • Start date Start date
B

blenno

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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top