Goal Seek Excel
Goal Seek Excel
(OP)
thread770-224290: Automatic goal seek
Hello handleman
My question is similar to the thread but it is a very basic question to do with incorporating your goal seek code into Excel in the so it runs automatically each time cells are changed instead of having to run a macro
My example
Goal seek by Setting cell C6 to 5,000 by changing A5
What I need to know is where you insert the VBA code – it does not work when I simply paste your code in the macro editor for an existing recorded macro. So I would be very grateful if you could assume that I am starting from scratch and have no macro at all and outline the steps I need to take as a basic excel user
Thanks
Hello handleman
My question is similar to the thread but it is a very basic question to do with incorporating your goal seek code into Excel in the so it runs automatically each time cells are changed instead of having to run a macro
My example
Goal seek by Setting cell C6 to 5,000 by changing A5
What I need to know is where you insert the VBA code – it does not work when I simply paste your code in the macro editor for an existing recorded macro. So I would be very grateful if you could assume that I am starting from scratch and have no macro at all and outline the steps I need to take as a basic excel user
Thanks





RE: Goal Seek Excel
This would be in the worksheet VBA & a "selectionchange"
Private Sub Worksheet_Calculate()
If IsNumeric(Range("error")) Then
If Range("error") <> 0 Then
Range("error").GoalSeek Goal:=0.0000000001, ChangingCell:=Range("assum_F")
End If
End If
End Sub
RE: Goal Seek Excel
Unforunately I do not program in VBA so Could you please outline in a step by step manner what I need to do in Excel/VBA editor/macro to have an automatic goal seak update in an excel worksheet using teh example I gave . Thanks again
RE: Goal Seek Excel
Private Sub Worksheet_Calculate()
If IsNumeric(Range("c6")) Then
If Range("c6") <> 5000 Then
Range("c6").GoalSeek Goal:=5000, ChangingCell:=Range("a5")
End If
End If
End Sub
RE: Goal Seek Excel
http://excel.kingofmath.com/?p=267
RE: Goal Seek Excel
I wonder if the method in this post thread378-249524: Solving the Colebrook-White equation in Excel without Solver/VB/macro could help you without needing a macro.
Good luck,
Latexman