-
Apr 8th, 2007, 01:09 AM
#1
Thread Starter
Addicted Member
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.
-
Apr 8th, 2007, 02:11 AM
#2
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)
-
Apr 10th, 2007, 02:10 PM
#3
Thread Starter
Addicted Member
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.
-
Apr 10th, 2007, 08:18 PM
#4
-
Apr 12th, 2007, 11:43 AM
#5
Thread Starter
Addicted Member
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!
-
Apr 12th, 2007, 11:45 AM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|