跳到主要内容

PDURATION

Returns the number of periods required by an investment to reach a specified value.

Syntax

expression.PDURATION(arg1, arg2, arg3);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe interest rate per period.
arg2RequiredApiRange | ApiName | numberThe present value of the investment.
arg3RequiredApiRange | ApiName | numberThe desired future value of the investment.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.PDURATION("2.50%", 2000, 2200));