Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

傳回指定年金每期利率的 Double。

語法

評等 ( nper 、 pmt, pv [, fv ] [, type ] [, guess ] )

Rate 函數語法具有下列自變數:

引數

描述

nper

必要。 Double 指定年金的總付款期數。 舉例來說,如果您按月償還為期四年的汽車貸款,那麼貸款總付款期數會是 4 * 12 (或 48)。

pmt

必要。 指定每期付款的 Double。 付款通常會包含本金和利息,並且不會隨年金的期限變化。

光伏

必要。 Double 會指定一系列未來付款或收入的現值或現值。 例如,當您借錢買車時,貸款金額就是您每月汽車付款總額的現值。

fv

可省略。 Variant 指定最後付款后所需的未來價值或現金餘額。 例如,貸款的終值是 $0,因為這是其最終付款的值。 不過,如果您想要為您的子女儲蓄 $50,000 教育基金 (18 年),則 $50,000 是終值。 如果沒有指定,會假設為 0。

type

可省略。 Variant 指定指定付款期限的數位。 如果給付時點為付款期限結束時,則使用 0;如果給付時點為期限開始時,則使用 1。 如果沒有指定,會假設為 0。

guess

選擇性。 指定您估計值的 Variant 會由 Rate 傳回。 如果省略, guess 為 0.1 (10%) 。

註解

年金是指一段時間內,一系列的固定現金付款活動。 年金可能是一筆貸款 (例如房屋貸款) 或投資 (例如每月存款計劃)。

對於所有引數,付出的現金 (例如要儲蓄的存款金額) 是由負數表示;收入的現金 (例如股利支票) 是由正數表示。

費率 是依反覆運算來計算。 從 guess 值開始, Rate 會循環計算,直到結果精確到 0.00001% 以內。 如果 Rate 在嘗試 20 次之後找不到結果,則會失敗。 如果您的猜測是 10%, 而 Rate 失敗,請嘗試不同的 guess 值。

查詢範例

Expression

結果​​

SELECT FinancialSample.*, (Rate ([TermInYears]*12,-[MonthlyRePayment],[LoanAmount],0,0,0.1) *12) AS InterestRate FROM FinancialSample;

傳回 「FinancialSample」 資料表中的所有欄位,以及以 「TermInYears」、“MonthlyRePayment” 和 “LoanAmount” 為基礎的年利率,並在 [InterestRate] 數據行中顯示結果。

VBA 範例

附註: 下列範例示範如何在 Visual Basic for Applications (VBA) 模組中使用此函數。 如需使用 VBA 的詳細資訊,請在 [搜尋] 旁的下拉式清單中選取 [開發人員參考],並在 [搜尋] 方塊中輸入一個或多個字詞。

此範例使用 Rate 函數來計算貸款的利率,以指定總付款 (TotPmts) 、貸款付款 (Payment) 金額、貸款 (PVal) 的現值或本金、貸款 (FVal) 的未來值,這是指出付款期初或結束 (PayType) 的數位, 及預期利率的估計 (Guess) 。

Dim Fmt, FVal, Guess, PVal
Dim Payment, TotPmts, PayType, APR
' When payments are made.
Const ENDPERIOD = 0, BEGINPERIOD = 1
Fmt = "##0.00" ' Define percentage format.
FVal = 0 ' Usually 0 for a loan.
Guess = .1 ' Guess of 10 percent.
PVal = InputBox("How much did you borrow?")
Payment = InputBox("What's your monthly payment?")
TotPmts = InputBox("How many monthly payments do " & _
"you have to make?")
PayType = MsgBox("Do you make payments at the end " & _
"of the month?", vbYesNo)
If PayType = vbNo Then
PayType = BEGINPERIOD
Else PayType = ENDPERIOD
End If
APR = (Rate(TotPmts, -Payment, PVal, _
FVal, PayType, Guess) * 12) * 100
MsgBox "Your interest rate is " & _
Format(CInt(APR), Fmt) & " percent."

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×