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.
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)
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.
1 Attachment(s)
Re: Is there a Goal Seek function in VB? Please help with mathematical problem.
This one is a tad more longer :p
DownPayment = (TotalDownPayment x Month - Price(1 + IR)) / (M - (1 + IR))
IR = 0.1 (10/100) ;)
Or written condensed :)
Attachment 55973
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! :wave:
I really can't figure out how you can come out to the equation, I have tried hard :blush:
thanks again!
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. :)