跳到主要内容

PV

返回投资的现值:一系列未来付款现在的总价值。

语法

expression.PV(arg1, arg2, arg3, arg4, arg5);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number每期的利率。例如,按 6% 年利率进行季度付款时使用 6%/4。
arg2必需ApiRange | ApiName | number投资的付款期总数。
arg3必需ApiRange | ApiName | number每期的付款额,在投资期限内不能更改。
arg4可选ApiRange | ApiName | number未来值,或最后一次付款后将达到的现金余额。如果省略,则等于 0。
arg5可选ApiRange | ApiName | number逻辑值:期初付款 = 1;期末付款 = 0 或省略。

返回值

number

示例

此示例演示如何返回投资的现值:一系列未来付款现在的总金额。

// How to get the present value of an investment.

// Use a function to calculate the total amount that a series of future payments is worth now.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.PV(0.1/12, 2*12, -500, 0));