Goal seek in vba

N

Niek Otten

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
 
O

Olga

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
 
A

A.W.J. Ales

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 *
 

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

Top