MIRR Function [VBA]

Calculates the modified internal rate of return of a series of investments.

warning

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


Бинтаксис:


MIRR(Values() as Double, Investment as Double, ReinvestRate as Double)

Return value:

Double

ΠŸΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€Ρ‹:

Values(): An array of cash flows, representing a series of payments and income, where negative values are treated as payments and positive values are treated as income. This array must contain at least one negative and at least one positive value.

Investment: is the rate of interest of the investments (the negative values of the array).

ReinvestRate: the rate of interest of the reinvestment (the positive values of the array).

Error codes:

5 ΠΠ΅ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½Ρ‹ΠΉ Π²Ρ‹Π·ΠΎΠ² ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Ρ‹

ΠŸΡ€ΠΈΠΌΠ΅Ρ€:


REM ***** BASIC *****
Option VBASupport 1
Sub ExampleMIRR
 Dim cashFlow(0 to 3) As Double
 cashFlow(0) = -5
 cashFlow(1) = 10
 cashFlow(2) = 15
 cashFlow(3) = 8
 mirrValue = MIRR(cashFlow,0.5,0.1) * 100
 Print mirrValue ' returns 94.16. The modified internal rate of return of the cash flow.
End Sub