Thread: Goal Seek macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Inbar Inbar is offline
external usenet poster
 
Posts: 15
Default Goal Seek macro

Did you define x as a variable? (dim x...)
Did you select only one cell which to be the goal?

"Jeff" wrote:

Hi

I was using goal seek in a macro to find an interest rate.

But the goal I am seeking changes so in my code I have

ActiveCell.GoalSeek Goal:=X, ChangingCell:=Range("A3")

Where "X" is set to Range("A1").value
But this gives me a "Reference is not valid" error.
Is there any way around this, so that I can assign the goal in a cell in the
worksheet and have the macro calculate the interest rate using "goal seek"

Thanks

But this gives me an error.