+ Reply to Thread
Results 1 to 8 of 8

How do I get a specific outcome from a function?

  1. #1
    Registered User
    Join Date
    01-10-2016
    Location
    Iceland
    MS-Off Ver
    2013
    Posts
    3

    How do I get a specific outcome from a function?

    This might be a newbie question. I have a function and its outcome. I wan't the outcome to be a specific number. Is there any way to make excel adjust the right numbers for the cells that are in the function, so that I get the specific outcome?

    An example. A1's value is 10, A2's value is also 10. In A3 I write =sum(A1:A2), of course I get 20. But let's say that I wanted to make excel find what value would need to be in A1 so that the outcome of the function in A3 becomes 30 (I have no idea the answer is 20).

    Any way to do this?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How do I get a specific outcome from a function?

    Couldn't you use simple subtraction?

    In A3 you could have this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How do I get a specific outcome from a function?

    If you have the answer and 1 of 2 numbers, shouldnt it be a simple matter to just reverse the calc? =A1-30 (or A2-30)
    ?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    01-10-2016
    Location
    Iceland
    MS-Off Ver
    2013
    Posts
    3

    Re: How do I get a specific outcome from a function?

    It's just an example, was trying to explain what I'm trying to do.

    I'm asking because I'm creating a model for a fixed rate amortisation schedule, for a mortgage. The loan is set for 40 years, but I can pay a certain amount the principal every month and reduce the period of the loan. I have made a function for the years it would take me to pay up the loan. As I raise the amount I pay into the principal every month the number of years go down.

    Now I want to find the exact amount I need to pay to make the period of the loan 20 years. I don't want to guess the amount, is there any way I can make excel find it for me?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How do I get a specific outcome from a function?

    if you google excel amortization formula, you get a few good hits, see if 1 of those will help you?

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: How do I get a specific outcome from a function?

    Given all the financial functions available in Excel, I would have thought there would be one you could use:

    https://support.office.com/en-us/art...1-fbf124c2b1d8


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Registered User
    Join Date
    01-10-2016
    Location
    Iceland
    MS-Off Ver
    2013
    Posts
    3

    Re: How do I get a specific outcome from a function?

    Found it, I was looking for Goal Seek all along.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How do I get a specific outcome from a function?

    Solver could also be a choice and allow you to have control over both A1 and A2 by using constraints.
    Eg. A3 has =SUM(A1:A2)
    You want the sum to be 30 and A2 to be half of A1. You would set the constraint to be A1=A2/2 and using Simplex LP as the solving method the answer would be
    A1= 20
    A2= 10
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. [SOLVED] If function, many ifs but one or two outcome?
    By axangec in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-11-2016, 06:14 AM
  2. IF Function returning text as outcome
    By pedro90 in forum Excel General
    Replies: 9
    Last Post: 12-02-2014, 01:06 PM
  3. [SOLVED] IF Statement which includes an outcome only if specific criteria are met
    By lynnepooh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-06-2013, 03:03 PM
  4. Function to write Data to DB from specific rows and colomuns Plus specific Timestamp
    By Mudhafar.M in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2013, 08:01 PM
  5. [SOLVED] outcome of CONCATENATE function
    By clareleeder in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-20-2013, 01:17 PM
  6. [SOLVED] If function Multiple logic tests each with its own outcome. How do I write it.
    By markDuffy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-16-2013, 04:29 PM
  7. Linking the outcome of an IF function to a vlookup.
    By Colin86 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-16-2013, 04:37 PM

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