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,指定資產在特定的時段內使用倍數遞減法或您指定的其他方法所計算的折舊。

語法

DDB ( 成本、殘餘、生命週期、期間 [、因素] )

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

引數

描述

成本

必要。 Double 指定資產的初始成本。

打撈

必要。 Double 會在資產的使用期限結束時指定資產的值。

使用時間

必要。 Double 指定資產的使用年限長度。

時期

必要。 Double 指定計算資產折舊的期間。

因素

選擇性。 Variant 指定餘額遞減的比率。 如果省略,會假設為 2 (倍遞減法) 。


註解

倍率遞減法使用加速比率計算折舊。 折舊數額在首期最高,然後在後繼期間依次遞減。

生命 期間自變數必須以相同的單位表示。 例如,如果 生命 週期是以月為 指定,則 期間也必須以月為指定。 所有自變數都必須是正數。

DDB 函數使用下列公式來計算指定期間的折舊:

折舊 / 期間 = ( (成本salvage) * factor) / life

範例

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

此範例使用 DDB 函數傳回資產在指定期間內以初始成本計算 (InitCost) 的折舊、資產實用生命 (SalvageVal) 結尾的殘餘價值、以年 (LifeTime) 計算資產的總生命週期,以及計算折舊的年限 (Depr) 。

Dim Fmt, InitCost, SalvageVal, MonthLife, LifeTime, DepYear, Depr
Const YRMOS = 12 ' Number of months in a year.
Fmt = "###,##0.00"
InitCost = InputBox("What's the initial cost of the asset?")
SalvageVal = InputBox("Enter the asset's value at end of its life.")
MonthLife = InputBox("What's the asset's useful life in months?")
Do While MonthLife < YRMOS ' Ensure period is >= 1 year.
MsgBox "Asset life must be a year or more."
MonthLife = InputBox("What's the asset's useful life in months?")
Loop
LifeTime = MonthLife / YRMOS ' Convert months to years.
If LifeTime <> Int(MonthLife / YRMOS) Then
LifeTime = Int(LifeTime + 1) ' Round up to nearest year.
End If
DepYear = CInt(InputBox("Enter year for depreciation calculation."))
Do While DepYear < 1 Or DepYear > LifeTime
MsgBox "You must enter at least 1 but not more than " & LifeTime
DepYear = InputBox("Enter year for depreciation calculation.")
Loop
Depr = DDB(InitCost, SalvageVal, LifeTime, DepYear)
MsgBox "The depreciation for year " & DepYear & " is " & _
Format(Depr, Fmt) & "."

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!

×