SYD 函数

应用对象
Microsoft 365 专属 Access Access 2021 Access 2019 Access 2016

返回一个 Double 值,指定指定期间资产的年总和折旧。

语法

SYD (成本、打捞、生命、周期)

SYD 函数语法具有以下参数:

参数 说明
成本 必需。 双重 指定资产的初始成本。
打捞 必需。 资产的使用寿命结束时指定其值。
生活 必需。 指定资产的使用寿命长度的双精度值。
时期 必需。 指定计算资产折旧额的周期的双精度值。

备注

lifeperiod 参数必须以相同的单位表示。 例如,如果 生命 以月为单位,则 周期 也必须以月为单位。 所有参数都必须是正数。

查询示例

Expression 结果
SELECT SYD ([LoanAmount],[LoanAmount]*.1,20,2) AS Expr1 FROM FinancialSample; 计算价值为“LoanAmount”的资产的折旧值,将“LoanAmount”的残值 ( 10% 乘以 0.1) ,并考虑该资产的使用寿命为 20 年。 折旧计算第二年。
SELECT SYD ([LoanAmount],0,20,3) AS SLDepreciation FROM FinancialSample; 返回价值为“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) & "."