Results 1 to 6 of 6

Thread: Is there a Goal Seek function in VB? Please help with mathematical problem.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Posts
    237

    Is there a Goal Seek function in VB? Please help with mathematical problem.

    I'm making an application that need to use a function like 'goal seek' in Excel. Here's the problem example:

    Price: 100.000
    Down Payment: 20% -> 20.000
    Payment per month: 8.000 (assume a 10 month period)
    Total Down Payment: 28.000 (20% of 100.000 + 8.000 first payment)

    Now I want the Total Down Payment to be 30.000, so I need to change the Down Payment of 20% to another value. In Excel, I can use the Goal Seek Function to do this very easily, and the Down Payment results in 22,2222%.

    How do I do it in VB?

    Thanks.

  2. #2
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Is there a Goal Seek function in VB? Please help with mathematical problem.

    I just solved it as a math equation and rearranged the values around (I wrote it using letters so i can get the required formula)

    DownPayment = (MonthPeriod x TotalDownPayment - Price) / (9 x MonthPeriod)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Posts
    237

    Re: Is there a Goal Seek function in VB? Please help with mathematical problem.

    Hi Andrew G, thank you very much for your solution, you're a genius! I really don't know how you can get that equation. Can I ask you for another solution? I need to add another variable to the problem:

    Price: 100.000
    Down Payment: 20% -> 20.000
    Interest rate: 10% -> 8.000 (10% of 100.000 - 20.000)
    Month period = 10 month
    Payment per month: 8.800 -> (80.000 + 8.000) / 10
    Total Down Payment: 28.800 (20% of 100.000 + 8.800 first payment)

    Again, I want the Total Down Payment to be 30.000, and using the goal seek function in Excel, the Down Payment should be 21,3483146067416% (21,3484%)

    Thank you very much Andrew.

  4. #4
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Is there a Goal Seek function in VB? Please help with mathematical problem.

    This one is a tad more longer

    DownPayment = (TotalDownPayment x Month - Price(1 + IR)) / (M - (1 + IR))

    IR = 0.1 (10/100)

    Or written condensed
    Name:  equation.bmp
Views: 3466
Size:  1.1 KB

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Posts
    237

    Re: Is there a Goal Seek function in VB? Please help with mathematical problem.

    Thank you very much Andrew G! You are truly a genius!
    I really can't figure out how you can come out to the equation, I have tried hard

    thanks again!

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Is there a Goal Seek function in VB? Please help with mathematical problem.

    If you consider this resolved, would you please pull down the Thread Tools menu and click the Mark Thread Resolved menu item? That will let everyone know that you have your answer.

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width