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!
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: