+ Reply to Thread
Results 1 to 4 of 4

Creating a goal seek function

  1. #1
    Registered User
    Join Date
    02-01-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    2

    Creating a goal seek function

    First of all, thank you for taking time to help me out. I have very little experience with coding so thanks for being patient.

    My problem is trying to figure out a friction coefficient and to do it repeatably in a mass of data.

    The friction coefficient is in both sides of a formula (LHS and RHS) so I'm using a goal seek to set the delta (LHS-RHS) to zero.

    I have 4 columns I'm working with: LHS, RHS, Delta, FricCoeff

    I would like to create a function that I can type into the formula and drag all the way down to the end of the chart in the FricCoeff column. For example, I would like to enter in "=goalseek(delta)" where I choose the cell 'delta' is in. So it would appear something like =goalseek(c2) or something.

    I believe I have to set the friction coefficient column to some value first before goal seek works so I've set it to "1". This is what I have in code, but I know for a fact that this doesn't work and is probably wrong on so many levels in terms of syntax...so sorry for that..

    Please Login or Register  to view this content.
    Any help would be great!
    Thank you again
    Last edited by pqpine413; 02-01-2011 at 03:44 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Creating a goal seek function

    Welcome to the forum.

    A user-defined function can't do anything but return a value to the cell in which it appears, so it needs to be a sub.

    Please Login or Register  to view this content.
    Please take a few minutes to read the forum rules, and then edit your post to change your QUOTE tags to CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-01-2011
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Creating a goal seek function

    hi shg, thanks, i've changed the tag

    so i would start my code with sub goalseek()?

    can i use this as a forumla? also where do i input the "delta" cell?

    thanks

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Creating a goal seek function

    Thanks.

    I don't have a clue how to answer those questions without seeing what you're trying to do. Can you post a workbook and explain in context?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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