Goal seek in vba

  • Thread starter Thread starter Rob
  • Start date Start date
Hi Rob,

Maybe I misunderstand your question; why not record a macro while doing a
goalseek in the worksheet?

Please post again in this thread if that is not what you mean

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 
Hi Rob

Did you succeed in writing VBA code on GoalSeek? I am trying to do the same and it doesn't work

Thank
Olg

----- Rob wrote: ----

Hi All

could someone show me some vba code to do a goal seek on a cell

Cheers

Ro
 
Olga, Rob,

Sub AAMacro2()
Source = Cells(1, 6)
ResultCell = Cells(2, 6).Value
Result = Cells(3, 6).Value
Range(ResultCell).GoalSeek Goal:=Result, ChangingCell:=Range(Source)
End Sub



--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
Back
Top