+ Reply to Thread
Results 1 to 9 of 9

Goal Seek With Multiple Input Cells

  1. #1
    Registered User
    Join Date
    11-07-2015
    Location
    Boise, Idaho
    MS-Off Ver
    2013
    Posts
    18

    Goal Seek With Multiple Input Cells

    I am wanting to goal seek in one "set cell" by changing the values in multiple cells. For example, A1:H1 are my range of cells with formulas that I want to change and J1 (with a formula) is my set cell that I am wanting to goal seek.

    Two additional requirements are that there can be no duplicate values in the range A1:H1 and that the goal value will sometimes change, so I would like to reference the goal value from a another cell, say cell L1.

    I am just starting to learn how to use VBA codes created by other people and have tried to modify a couple of codes I have found that do similar functions, but have had no luck in making them work. I am hoping this is not an overly complicated code to create. Any help would be greatly appreciated.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Goal Seek With Multiple Input Cells

    It is difficult to say for certain without actually seeing the problem, but it sounds like the built in Solver utility should be able to solve the problem for you without VBA.

    https://support.office.com/en-us/art...B-F63E45925040
    http://www.solver.com/solver-tutoria...-or-solver-sdk
    http://www.excel-easy.com/data-analysis/solver.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    11-07-2015
    Location
    Boise, Idaho
    MS-Off Ver
    2013
    Posts
    18

    Re: Goal Seek With Multiple Input Cells

    Quote Originally Posted by MrShorty View Post
    It is difficult to say for certain without actually seeing the problem, but it sounds like the built in Solver utility should be able to solve the problem for you without VBA.
    I'll Take another look at the Solver. I didn't get anywhere when I previously tried to use it. I would post my actual worksheet, but it is huge and complicated. The formulas are daisy chained through multiple links. It has crashed my Excel a few times because of it.

    Thanks for the input.

  4. #4
    Registered User
    Join Date
    11-07-2015
    Location
    Boise, Idaho
    MS-Off Ver
    2013
    Posts
    18

    Re: Goal Seek With Multiple Input Cells

    I have retried the Solver add-in and it does almost work, but I still can't figure out how to prevent duplicates. How do you prevent duplicates with the constraints?

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Goal Seek With Multiple Input Cells

    It will depend on the details of your Solver model. I could see trying a =COUNTIF() function somewhere in the model, then set a constraint that this COUNTIF() should be <=1. I could also see that not working very well.

  6. #6
    Registered User
    Join Date
    11-07-2015
    Location
    Boise, Idaho
    MS-Off Ver
    2013
    Posts
    18

    Re: Goal Seek With Multiple Input Cells

    Quote Originally Posted by MrShorty View Post
    It will depend on the details of your Solver model. I could see trying a =COUNTIF() function somewhere in the model, then set a constraint that this COUNTIF() should be <=1. I could also see that not working very well.
    Here is how I solved it. Which probably only applies to my specific problem, but I will post it any way. I used this formula in my range of input cells:
    Please Login or Register  to view this content.
    Since the values I get are within a specific range (1-16), I used this formula to index from values that are not in the range (17-32). Anyway, it works for me and prevents duplicates. Thanks for the help.

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Goal Seek With Multiple Input Cells

    but I still can't figure out how to prevent duplicates
    After you have define the range of cells to change you add the constraints so you could selct the "dif" setting i.e. this ensures that ever cell in the range specified is different to each other.

    How good this is? Don't know as I never have used it. Probably best not to specify to many cell as "dif"

    Alf

  8. #8
    Registered User
    Join Date
    11-07-2015
    Location
    Boise, Idaho
    MS-Off Ver
    2013
    Posts
    18

    Re: Goal Seek With Multiple Input Cells

    Quote Originally Posted by Alf View Post
    After you have define the range of cells to change you add the constraints so you could selct the "dif" setting i.e. this ensures that ever cell in the range specified is different to each other.

    How good this is? Don't know as I never have used it. Probably best not to specify to many cell as "dif"

    Alf
    I tried it, I still got duplicates. There must be additional constraints needed? I couldn't figure it out

  9. #9
    Registered User
    Join Date
    11-07-2015
    Location
    Boise, Idaho
    MS-Off Ver
    2013
    Posts
    18

    Re: Goal Seek With Multiple Input Cells

    I figured out the the Solver add-in was not giving duplicates. I did not select the Integer constraint, so I was getting fractional returns. Where I seen two 6's, I was actually getting 6.1 & 6.4, but my cells were formatted to show whole numbers only. The Solver works great, it can even do two separate ranges as input values. I'm glad I took a second look at this tool.

+ 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. Goal seek on multiple cells
    By oakwood in forum Excel General
    Replies: 1
    Last Post: 06-13-2012, 07:04 AM
  2. [SOLVED] How can I use Goal Seek in multiple cells?
    By Rey M in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-22-2005, 11:05 PM
  3. [SOLVED] Goal seek multiple cells
    By ?? in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-05-2005, 02:32 AM
  4. [SOLVED] Goal Seek on Multiple Cells
    By newtoloop in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-18-2005, 10:06 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