目录

# IRR 函数 [VBA]

计算投资回报的内部比率。

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

### 语法:

    IRR(ValueArray as Double , [Guess as Variant]) As Double

### 返回值:

Double

### 参数:

ValueArray: The array of values of the cash-flow. The values represent cash flow values at regular intervals, at least one value must be negative (payments), and at least one value must be positive (income).

Guess: An initial estimate at what the IRR will be.

### 错误代码:

5 无效的过程调用

### 示例:

    REM ***** BASIC *****
    Option VBASupport 1
    Sub ExampleIRR
     Dim cashFlow(0 to 3) As Double
     cashFlow(0) = -10000
     cashFlow(1) = 3500
     cashFlow(2) = 7600
     cashFlow(3) = 1000
     irrValue = IRR(cashFlow) * 100
     Print irrValue ' 返回 11.3321028236252 。现金流回报的内部比例。
    End Sub

相关主题

Calc 中的 IRR 函数

VBA 财务函数