Rate Function [VBA]

Returns the interest rate of a loan or an investment.

warning

This constant, function or object is enabled with the statement Option VBASupport 1 placed before the executable program code in a module.


Syntax:


Rate( NPer as Double, Pmt as Double, PV as Double [FV as Variant], [Due as Variant], [Guess as Variant] )

Return value:

Double

Parameters:

NPer αž‚αžΊβ€‹αž‡αžΆβ€‹αž…αŸ†αž“αž½αž“β€‹αžšαž™αŸˆαž–αŸαž›β€‹αžŸαžšαž»αž” αž€αŸ†αž‘αž»αž„β€‹αžŠαŸ‚αž›β€‹β€‹αž”αŸ’αžšαžΆαž€αŸ‹β€‹αž”αŸ’αžšαž…αžΆαŸ†β€‹αžαŸ’αž„αŸƒβ€‹αžŽαžΆαž˜αž½αž™β€‹αžαŸ’αžšαžΌαžœβ€‹αž…αŸ†αžŽαžΆαž™Β αŸ”

Pmt β€‹αž‡αžΆβ€‹αž€αžΆαžšβ€‹αž”αž„αŸ‹β€‹αž”αŸ’αžšαžΆαž€αŸ‹β€‹αž’αž˜αŸ’αž˜β€‹αžαžΆβ€‹αž’αŸ’αžœαžΎβ€‹αž€αŸ’αž“αž»αž„β€‹αž’αŸ†αž‘αž»αž„αž–αŸαž›β€‹ αŸ”β€‹

PV is the present value of the loan / investment.

FV (optional) is the future value of the loan / investment.

Due (optional) defines whether the payment is due at the beginning or the end of a period.

0 - the payment is due at the end of the period;

1 - the payment is due at the beginning of the period.

Guess(optional) determines the estimated value of the interest with iterative calculation.

Error codes:

5 αž€αžΆαžšβ€‹αž αŸ…β€‹αž”αŸ‚αž”αž”αž‘β€‹αž˜αž·αž“β€‹αžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœ

Example:


REM ***** BASIC *****
Option VBASupport 1
Sub ExampleRate
' Calculate the interest rate required to pay off a loan of $100,000 over
' 6 years, with payments of $1,500, due at the end of each month.
 Dim mRate As Double
 mRate = Rate( 72, -1500, 100000 )
 print mRate' mRate is calculated to be 0.00213778025343334
End sub

Please support us!