Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate interest rate
Message
From
23/02/2004 16:04:58
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
 
 
To
23/02/2004 12:45:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00879962
Message ID:
00880076
Views:
34
Hi Chuck,

>
>This website had a function to solve for a var. Using the equation I gave you before it could solve every thing exect for the interestrate.
>
>http://www.hostsrv.com/webmab/app1/MSP/quickmath/02/pageGenerate?site=quickmath&s1=equations&s2=solve&s3=basic
>
>So you can look at the other equations to see if it helps or you could create a loop and loop though posible interest rates util you find a match. Something like FOR i = 0 TO 1 STEP .005
>

I ended up iterating through the possible rates like you suggested. I guess that is the only way to get the answer. My code looks something like this:
For lnIntRate = 0 to 1 Step .000001
	If Payment(lnAmtFinan, lnIntRate, lnNumPayments) >= lnPayment
		Exit
	EndIf 
EndFor 

Return lnIntRate
Not the fastest piece of code in the world, but it works. Thanks.
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Previous
Reply
Map
View

Click here to load this message in the networking platform