Results 1 to 3 of 3

Help with code for Goal Seek

Threaded View

  1. #1
    Registered User
    Join Date
    07-11-2006
    Posts
    17

    Unhappy Help with code for Goal Seek

    Hi, I have the following code, but it doesn't work!


    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Target.Row = 15 And Target.Column = 9 Then
    Range("M40").GoalSeek Goal:=0, ChangingCell:=Range("M38")
    Range("M51").GoalSeek Goal:=0, ChangingCell:=Range("M49")
    End If
    End Sub
    --
    Basically I have a drop down bar in cell R15C9, everytime that cell changes, I want Goal Seek to automatically make 2 calculations, one is to change M38 so that M40=0, and the other is to change M49 so that M51=0.

    Somehow the code above isn't working for me. Any idea why?

    Thanks in advance for any help you can give!
    Last edited by Cutter; 08-17-2012 at 09:53 PM. Reason: Added code tags

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