Y2oqX‖

jLrMj‖Rate Function [VBA]

wd5A3‖Returns the interest rate of a loan or an investment.

warning

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


FVEx2‖Syntax:


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

GePPP‖Return value:

Double

WADQ4‖Parameters:

dGUHn‖NPer is the total number of periods, during which annuity is paid.

MPYBY‖Pmt is the regular payment made per period.

CHVqQ‖PV is the present value of the loan / investment.

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

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

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

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

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

SEjHR‖Error codes:

5 Invalid procedure call

EFSA4‖Example:


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