返回指定指定期间内资产折旧年数之和的 Double。
语法
SYD (成本、报废、寿命、经期)
SYD 函数语法具有以下参数:
| 参数 | 说明 |
|---|---|
| 成本 | 必需。 Double 指定资产的初始成本。 |
| Salvage | 必需。 双重 指定资产在其使用寿命结束时的价值。 |
| 生活 | 必需。 双精度 指定资产使用寿命的长度。 |
| 句点 | 必需。 双重 指定计算资产折旧的时期。 |
备注
寿命和周期参数必须使用相同的单位表示。 例如,如果 生命 以月为单位,则 周期 也必须以月为单位。 所有参数必须为正数。
查询示例
| Expression | 结果 |
|---|---|
| SELECT SYD ([LoanAmount],[LoanAmount]*.1,20,2) AS Expr1 FROM FinancialSample; | 计算价值为“LoanAmount”的资产的折旧值,残值为 10% (“LoanAmount”乘以 0.1) ,考虑资产的使用寿命为 20 年。 第二年计算折旧。 |
| SELECT SYD ([LoanAmount],0,20,3) AS SLDepreciation FROM FinancialSample; | 返回资产的折旧值为“LoanAmount”,残值为 0 美元,考虑到资产的使用寿命为 20 年。 结果将显示在 SLDepreciation 列中。 折旧在第三年计算。 |
VBA 示例
注意
下面的示例演示了在Visual Basic for Applications (VBA) 模块中使用此函数。 有关使用 VBA 的详细信息,请在“搜索”旁边的下拉列表中选择“开发人员参考”,然后在搜索框中输入一个或多个术语。
鉴于资产的初始成本 (InitCost) 、资产使用寿命结束时的残值 (SalvageVal) ,以及以年 () LifeTime 为单位的资产总寿命,本示例使用 SYD 函数返回资产在指定期限内的折旧值。 计算折旧的时期(以年为单位)为 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) & "."