Table of contents
TOC
折叠目录
展开目录

NPer 函数NPer Function

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回Double类型,指定根据定期定额支付且利率固定的年金的期数。语法NPer (速率pmtpv [、 fv [、类型]] )NPer函数具有下面这些命名参数Returns a Double specifying the number of periods for an annuity based on periodic, fixed payments and a fixed interest rate. SyntaxNPer( rate, pmt, pv [, fv [, type ]] ) The NPer function has thesenamed arguments:

部件Part说明Description
速率rate必填。 双精度指定各期利率。例如,如果您 10%的年度百分率 (APR) 处获得的汽车贷款,并按月支付,每期利率为 0.1/12,即 0.0083。Required. Double specifying interest rate per period. For example, if you get a car loan at an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per period is 0.1/12, or 0.0083.
pmtpmt必填。 双精度指定付款进行每个期间。付款金额通常包含本金和利息,该值在年金的周期不会改变。Required. Double specifying payment to be made each period. Payments usually contain principal and interest that doesn't change over the life of the annuity.
pvpv必填。 Double数据类型现值,即一系列未来付款或收入的当日,价值。例如,您借钱买车,贷款金额时,对贷方而言您按月付款的现值。Required. Double specifying present value, or value today, of a series of future payments or receipts. For example, when you borrow money to buy a car, the loan amount is the present value to the lender of the monthly car payments you will make.
fvfv可选。变量指定最后一次付款后所希望的终值或现金余额。例如,一笔贷款的未来值是 0 美元,因为这是最后一次付款后它的值。但是,如果您想要保存为孩子的教育经费超过 18 年的 50000 美元,$50000 是未来值。如果省略,则假定为 0。Optional. Variant specifying future value or cash balance you want after you've made the final payment. For example, the future value of a loan is $0 because that's its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.
类型type可选。 变量指定何时付款。使用 0; 如果付款的付款期,结尾的到期时间,或如果付款在期初的到期时间,请使用 1。如果省略,则假定为 0。Optional. Variant specifying when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

备注年金是一系列固定的现金付款,进行一段时间。年金可以是贷款 (如住房抵押) 或 (如每月储蓄计划) 的一笔投资。对于所有参数,现金支出 (如存款) 表示为负数;现金流出 (如股利支票) 用正数表示。Remarks An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan). For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers.

示例Example

本示例使用NPer函数返回其值包含在其间所需的付款要还清贷款的期数PVal。此外提供了每期利率 ( APR / 12),付款 ( Payment),贷款的未来值 ( FVal),和一个数字,指示是否在的开头或末尾付款期到期付款 ( PayType)。This example uses the NPer function to return the number of periods during which payments must be made to pay off a loan whose value is contained in PVal. Also provided are the interest percentage rate per period ( APR / 12), the payment ( Payment), the future value of the loan ( FVal), and a number that indicates whether the payment is due at the beginning or end of the payment period ( PayType).

Dim FVal, PVal, APR, Payment, PayType, TotPmts
Const ENDPERIOD = 0, BEGINPERIOD = 1    ' When payments are made.
FVal = 0    ' Usually 0 for a loan.
PVal = InputBox("How much do you want to borrow?")
APR = InputBox("What is the annual percentage rate of your loan?")
If APR > 1 Then APR = APR / 100    ' Ensure proper form.
Payment = InputBox("How much do you want to pay each month?")
PayType = MsgBox("Do you make payments at the end of month?", vbYesNo)
If PayType = vbNo Then PayType = BEGINPERIOD Else PayType = ENDPERIOD
TotPmts = NPer(APR / 12, -Payment, PVal, FVal, PayType)
If Int(TotPmts) <> TotPmts Then TotPmts = Int(TotPmts) + 1
MsgBox "It will take you " &; TotPmts &; " months to pay off your loan."
© 2018 Microsoft