+ Reply to Thread
Results 1 to 6 of 6

Goal Seek vba for multiple rows

  1. #1
    Registered User
    Join Date
    01-27-2016
    Location
    Canada
    MS-Off Ver
    10
    Posts
    5

    Goal Seek vba for multiple rows

    Hello,

    I am very new to vba and do not know much at all. I have a worksheet where I would like to use Goal Seek and run it against the data row-by-row. I have Googled other examples and found solutions however I haven't been able to make the code work for my scenario as I'm not experienced enough to manipulate coding.

    For data F4:H15, I would like to Set cell F4 to value G4 (another issue is I'm unable to 'select' G4 for this option without running a macro, I need to physically type this value in) by changing cell H4.

    See attached for spreadsheet example.

    Thank you for any help that anyone can provide!

    MM
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Goal Seek vba for multiple rows

    I don't understand exactly what you want to seek and change to what but here is a macro. You can just use the name manager to change the named ranges to suit your needs.
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Registered User
    Join Date
    01-27-2016
    Location
    Canada
    MS-Off Ver
    10
    Posts
    5

    Re: Goal Seek vba for multiple rows

    Thanks for your help Jacc - however I realize now that I provided misinformation.

    Ultimately, I need F4 to equal G4. Unfortunately, the current macro you provided equates F4 to H4.

    Since F4 = C4/I4, I need to goalseek a rate for I4 to divide C4 by.

    I hope that makes sense.

    Thanks again,

    Mark

  4. #4
    Registered User
    Join Date
    01-27-2016
    Location
    Canada
    MS-Off Ver
    10
    Posts
    5

    Re: Goal Seek vba for multiple rows

    Jacc, please ignore my previous post. I changed the GoalRange to column G and it worked.

    Thanks again!

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Goal Seek vba for multiple rows

    It's nice when things work out according to plan!

  6. #6
    Registered User
    Join Date
    06-28-2016
    Location
    Scotland
    MS-Off Ver
    2007
    Posts
    1

    Re: Goal Seek vba for multiple rows

    Do you need to use goalseek? Can't you get the same result using a formula in column I? (as in =C4/G4, which then makes F4 equal to G4)?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA goal seek multiple cells
    By bjcowen9000 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-10-2014, 06:43 PM
  2. Multiple Goal Seek
    By atamayoz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2012, 01:37 PM
  3. Multiple goal seek ?
    By Joenash in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2007, 12:30 PM
  4. [SOLVED] how to use goal seek in multiple cells?
    By A.M.Vel in forum Excel General
    Replies: 0
    Last Post: 07-27-2006, 08:30 AM
  5. [SOLVED] Goal seek multiple cells
    By ?? in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 AM

Tags for this Thread

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