+ Reply to Thread
Results 1 to 4 of 4

Goal Seek

  1. #1
    Registered User
    Join Date
    01-30-2005
    Posts
    2

    Goal Seek

    How do I get the goal seek to work automatically when I change some other values?

    Hope this makes sense

    Thanks for any help

    Mark

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    You could record a macro for the goal seek and then make it run on the Worksheet_Change event. If you need more details, please write back.


    - Mangesh

  3. #3
    Registered User
    Join Date
    01-30-2005
    Posts
    2
    Thanks!

    I did not know about the Worksheet_Change event.

  4. #4
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    I don't think you require further help, but just incase...

    Suppose the recorded macro is Macro1, then in the sheet where you have this goal seek thing, right click on the tab which shows the sheetname. select view code. Here enter the following code:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Target.Address = "$A$1" Or Target.Address = "$A$2" Then
    Call Macro1
    End If

    End Sub

    The if statement checks for changes in cells A1 and A2. You may modify this to suit your requirements, or you may completely remove the If statement and the end if.


    - Mangesh
    Last edited by mangesh_yadav; 01-31-2005 at 02:41 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1