傳回 Double, 指定資產在指定期間內按年數合計法計算的折舊。
語法
SYD ( 成本、搶救、life、期間 )
SYD函數語法具有下列引數:
引數 | 描述 |
---|---|
成本 |
必要。 指定資產的初始成本的double 。 |
salvage |
必要。 在實用的使用年限結束時, 指定資產的值。 |
實戰 |
必要。 指定資產使用年限長度的double 。 |
試用期 |
必要。 Double類型, 指定計算資產折舊的期間。 |
註解
Life 與period引數必須以相同的單位表示。 例如, 如果 [ life ] 是以月為單位, 則 [期間] 也必須以月為單位指定。 所有引數都必須是正數。
查詢範例
運算式 | 結果 |
---|---|
選取 [SYD] ([LoanAmount], [LoanAmount] *. 1, 20, 2) 作為 [FinancialSample] 中的 [運算式 1]; |
計算資產價值為 "LoanAmount" 的折舊, 殘值為 10% ("LoanAmount" 乘以 0.1), 並考慮資產的使用年限為20年。 折舊是針對第二年計算。 |
選取 [SYD] ([LoanAmount], 0, 20, 3) 作為從 FinancialSample 的 SLDepreciation; |
傳回資產價值為 "LoanAmount" 的折舊, 殘值為 $0, 考慮資產的使用年限為20年。 結果會顯示在 [欄 SLDepreciation] 中。 折舊是針對第三年計算。 |
VBA 範例
附註: 下列範例示範如何在 Visual Basic for Applications (VBA) 模組中使用此函數。 如需使用 VBA 的詳細資訊,請在 [搜尋] 旁的下拉式清單中選取 [開發人員參考],並在 [搜尋] 方塊中輸入一個或多個字詞。
這個範例使用SYD函數, 根據資產的初始成本 (InitCost)、資產的使用年限 (SalvageVal) 結尾的殘值, 以及總年數 (LifeTime), 傳回資產在指定期間內的折舊。 計算折舊之年份的期間是 PDepr。
Dim Fmt, InitCost, SalvageVal, MonthLife, LifeTime, DepYear, PDepr
Const YEARMONTHS = 12 ' Number of months in a year.
Fmt = "###,##0.00" ' Define money format.
InitCost = InputBox("What's the initial cost of the asset?")
SalvageVal = InputBox("What's the asset's value at the end of its life?")
MonthLife = InputBox("What's the asset's useful life in months?")
Do While MonthLife < YEARMONTHS ' 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 / YEARMONTHS ' Convert months to years.
If LifeTime <> Int(MonthLife / YEARMONTHS) Then
LifeTime = Int(LifeTime + 1) ' Round up to nearest year.
End If
DepYear = CInt(InputBox("For which year do you want depreciation?"))
Do While DepYear < 1 Or DepYear > LifeTime
MsgBox "You must enter at least 1 but not more than " & LifeTime
DepYear = CInt(InputBox("For what year do you want depreciation?"))
Loop
PDepr = SYD(InitCost, SalvageVal, LifeTime, DepYear)
MsgBox "The depreciation for year " & DepYear & " is " & Format(PDepr, Fmt) & "."
附註: 本頁面是經由自動翻譯而成,因此文中可能有文法錯誤或不準確之處。 讓這些內容對您有所幫助是我們的目的。 告訴我們這項資訊是否有幫助? 這裡是供您參考的英文文章。