# PPmt 函数PPmt Function

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

npernper必填。 整数，指定在年金总付款期数。例如，如果您按月支付四年的汽车贷款，贷款都有 4 * 12 （或 48） 的付款期总数。Required. Integer specifying total number of payment periods in the annuity. For example, if you make monthly payments on a four-year car loan, your loan has a total of 4 * 12 (or 48) payment periods.
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.

## 示例Example

``````Dim NL, TB, Fmt, FVal, PVal, APR, TotPmts, PayType, Payment, Msg, MakeChart, Period, P, I
Const ENDPERIOD = 0, BEGINPERIOD = 1    ' When payments are made.
NL = Chr(13) &; Chr(10)    ' Define newline.
TB = Chr(9)    ' Define tab.
Fmt = "###,###,##0.00"    ' Define money format.
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.
TotPmts = InputBox("How many monthly payments do you have to make?")
PayType = MsgBox("Do you make payments at the end of month?", vbYesNo)
If PayType = vbNo Then PayType = BEGINPERIOD Else PayType = ENDPERIOD
Payment = Abs(-Pmt(APR / 12, TotPmts, PVal, FVal, PayType))
Msg = "Your monthly payment is " &; Format(Payment, Fmt) &; ". "
Msg = Msg &; "Would you like a breakdown of your principal and "
Msg = Msg &; "interest per period?"
MakeChart = MsgBox(Msg, vbYesNo)    ' See if chart is desired.
If MakeChart <> vbNo Then
If TotPmts > 12 Then MsgBox "Only first year will be shown."
Msg = "Month  Payment  Principal  Interest" &; NL
For Period = 1 To TotPmts
If Period > 12 Then Exit For    ' Show only first 12.
P = PPmt(APR / 12, Period, TotPmts, -PVal, FVal, PayType)
P = (Int((P + .005) * 100) / 100)    ' Round principal.
I = Payment - P
I = (Int((I + .005) * 100) / 100)    ' Round interest.
Msg = Msg &; Period &; TB &; Format(Payment, Fmt)
Msg = Msg &; TB &; Format(P, Fmt) &; TB &; Format(I, Fmt) &; NL
Next Period
MsgBox Msg    ' Display amortization table.
End If
``````