Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Using Goal Seek on Multiple Rows

    Hi Guys,

    Im trying to use goal seek on multiple cells such that the cell set cell references another cell.

    For example, as shown in my code below, "4560" is in cell R8. so i want to reference cell R8 instead of typing 4560 directly.

    I also want to apply the goal seek formula to multiple rows.

    Please assist if you can.

    Sub TemGS()
    '
    ' TemGS Macro
    '
    '
    Range("Q8").GoalSeek Goal:=4560, ChangingCell:=Range("F8")
    Application.Goto Reference:="TemGS"
    End Sub

  2. #2
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,635
    Thanks
    115
    Thanked 649 Times in 592 Posts
    so i want to reference cell R8 instead of typing 4560 directly.

    Is this what you are trying to achieve?

    Code:
    Sub TemGS()
    For I = 1 To 10
        Range("Q" & I).GoalSeek Goal:=Range("R" & I), ChangingCell:=Range("F" & I)
    Next I
    Application.Goto Reference:="TemGS"
    End Sub
    You didn't state what he formula was in Q8 but it should make no difference.

    HTH,
    Maud
    Last edited by Maudibe; 2015-11-24 at 21:18.

  3. #3
    New Lounger
    Join Date
    Nov 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It was really Helpful and it worked.

    Thanks very much

  4. #4
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,635
    Thanks
    115
    Thanked 649 Times in 592 Posts
    Glad to hear it!

    Maud

Posting Permissions

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