HOW DO I SET PERMANENT GOAL SEEK IN EXCEL

Y

YKPURI

I HAVE TO BRING THE GOAL SEEK DIALOGUE BOX, EVERY TIME I MAKE A CHANGE IN THE
DATA. CAN GOAL SEEK BE PERMANENTLY SET , SO THAT I GET ANSWERS AUTOMATICALLY
EVERY TIME I CHANGE THE DATA & NOT HAVE TO REFER TO GOAL SEEK EVERYTIME.
 
J

JE McGimpsey

You could record a macro of your use of Goal Seek. Perhaps something
like:

Public Sub DoGoalSeek()
Const dGOAL As Double = 100
Const sCHANGINGCELLADDRESS As String = "A1"
Const sTARGETCELLADDRESS As String = "J10"

With Worksheets("Sheet1")
.Range(sTARGETCELLADDRESS).GoalSeek _
Goal:=dGOAL, _
ChangingCell:=.Range(sCHANGINGCELLADDRESS)
End With
End Sub

If you want you can make it work automatically by putting this in your
worksheet code module (right-click the worksheet tab and choose View
Code):


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
DoGoalSeek
End Sub
 

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