Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Excel Formula to FoxPro
Message
From
19/08/2007 12:52:09
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01249012
Message ID:
01249025
Views:
21
>Can anyone help me convert this Excel formula to FoxPro.
>
>=RATE(N,-((P+Z)/N),P)*12
>
>Thanks

Julie,

In addition to Hilmar's reply, I do not think there's any way to do it but iteration
In case of a loan

n        = number of periods (eg months)
i        = % intrest per period (ie 3%/year = .03 becomes 3/12% or .25% or .0025 /month if month = period)
pmt      = payment per period
pv       = initial amount or capital
fv       = 0 at the end
type     = 0, we pay at the end of each period

then

pmt      = pv * i
           ---------------------
                    1
             1 - ----------
                  (1 + i) ^ n


There's no way - that I know of - to get the i isolated to either side of the equation (in order to get i = ....)
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform