+ Reply to Thread
Results 1 to 6 of 6

Automate Goal Seek Function

  1. #1
    Registered User
    Join Date
    12-15-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    3

    Automate Goal Seek Function

    I'm looking for help in automating a goal seek formula to work out a margin. The aim is to get a target margin of 20% for all places. The formulas are all there.

    Goal Seek
    Set Cell AA3
    To Target 20%
    By changing cell G3

    Similarly for row 8 & row 13. File attached.

    The issue arises when I'm constantly checking for new prices. I want to be able to insert prices in sheet 2 and generate final sale price for all 3 markets at 20%. Do I have to trial and error or is there another method for doing this. Perhaps adding the 3 formulas on each line of a different sheet.

    Variables are 'Item Cost' & 'Postage Cost' (which is based on weight)

    I found a similar query but not sure it would work the same:
    http://www.excelforum.com/excel-prog...goal-seek.html

    Or is there a simpler way of working this out without macro?
    Attached Files Attached Files

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

    Re: Automate Goal Seek Function

    I often find that the easiest way to automate these kinds of things is to solve them algebraically, then enter that formula into AA3. I have not been through the algebra thoroughly, but these usually simplify down to something like AA=(sum(a bunch of stuff)*G+sum(more stuff not related to G))/(G*(a different sum of stuff)). Even though G shows up in a few different places, these can usually be solved for G using basic algebra. If you need a refresher: http://www.purplemath.com/modules/solvelin3.htm shows some examples of algebra problems where the unkown x shows up in multiple places in the problem.
    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
    12-15-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    3

    Re: Automate Goal Seek Function

    Thanks for the response, how would I do that if the formulas have a circular reference?

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

    Re: Automate Goal Seek Function

    Review the algebra tutorial, because she has examples where x is on both sides of the equals sign. The usual first step in solving those is to move all of the like terms to the same side of the equation.

  5. #5
    Registered User
    Join Date
    12-15-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    3

    Re: Automate Goal Seek Function

    Okay, thanks.

    I'm still not clear on what exactly the items in this formula would be, would you be able to be more detailed please?

    AA=(sum(a bunch of stuff)*G+sum(more stuff not related to G))/(G*(a different sum of stuff))

    Thanks

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

    Re: Automate Goal Seek Function

    Here's how I usually reverse engineer algebra in a scenario like this (using the variable A to represent cell AA, other cells represented by column letter):

    A=Z/H
    Z=Y-X
    H=G/1.2
    Y=H=G/1.2
    X=C+M+Q+R
    M=K+L
    L=0.1G
    Q=0.019G
    C,R,K are constants

    Begin to substitute quantities into A

    A=Z/H=(Y-X)/Y=(G/1.2-sum(C,M,Q,R))/(G/1.2)=(G/1.2-(C+K+0.1G+0.019G+R))/(G/1.2)
    A=(G/1.2-C-K-0.1G-0.019G-R)/(G/1.2)
    Continue by solving for G. First get G out of denominator by multiplying both sides by G/1.2, then combine like terms, and then finish solving for G.

    Did I reverse engineer the formulas correctly? Are you able to solve for G from this point?

+ 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. Trying to automate Goal Seek Function
    By mjrubin23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2016, 10:13 AM
  2. Attempt to automate goal seek; keep getting Type 13 mismatch error; VBA novice
    By exceljs88 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-14-2012, 11:51 AM
  3. Automate What IF Analysis (Goal Seek)
    By Savan87 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-13-2011, 01:03 PM
  4. Using Macro to automate goal seek in one column range
    By Hendra S in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2011, 07:49 AM
  5. Automate Goal Seek in VBA??
    By shaun2985 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2009, 09:17 AM
  6. Automate Goal Seek
    By marcghannoum@gm in forum Excel General
    Replies: 6
    Last Post: 01-26-2009, 02:47 PM
  7. Automate Goal Seek?
    By John Richards in forum Excel General
    Replies: 2
    Last Post: 04-23-2005, 10:06 AM

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