>Can anyone help me convert this Excel formula to FoxPro.
>
>=RATE(N,-((P+Z)/N),P)*12
>
>Thanks
The main problem here is the rate() function, which doesn't seem to be built-in into Visual FoxPro. As the description in Excel shows, it is calculated by iteration (i.e., trial and error); I think you will have to create your own function, also using iteration. For example, try an interest rate of 0% and 100%; if it turns out that 0% is too little and 100% too much, try with 50%; if this is too much, try with 25%, but if it is too little, try 75%, etc. This is a very simple algorithm; there are probably others that converge (approach the real value) faster.
As an alternative, if you need to do lots of calculations with advanced functions, use Excel Automation, and let Excel do the "dirty work".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)