Financial.SYD(Double, Double, Double, Double) 方法

定义

返回一个值,该值指定指定指定时间段内资产的年数折旧值。

public:
 static double SYD(double Cost, double Salvage, double Life, double Period);
public static double SYD(double Cost, double Salvage, double Life, double Period);
static member SYD : double * double * double * double -> double
Public Function SYD (Cost As Double, Salvage As Double, Life As Double, Period As Double) As Double

参数

Cost
Double

必填。 资产的初始成本。

Salvage
Double

必填。 资产在使用寿命结束时的价值。

Life
Double

必填。 资产的有用生命周期的长度。

Period
Double

必填。 计算资产折旧的时间段。

返回

指定时间段内资产的年数折旧。

例外

Salvage < 0、 Period>LifePeriod<=0。

示例

本示例使用 SYD 函数在给定资产的初始成本()、资产的有用生命期结束时的打捞值(InitCost)和资产的总寿命(SalvageVal以年为单位LifeTime)返回资产的折旧值。

Dim InitCost, SalvageVal, LifeTime, DepYear As Double
Dim Fmt As String = "###,##0.00"

InitCost = CDbl(InputBox("What's the initial cost of the asset?"))
SalvageVal = CDbl(InputBox("Enter the asset's value at end of its life."))
LifeTime = CDbl(InputBox("What's the asset's useful life in years?"))

' Use the SLN function to calculate the deprecation per year.
Dim SlnDepr As Double = SLN(InitCost, SalvageVal, LifeTime)
Dim msg As String = "The depreciation per year: " & Format(SlnDepr, Fmt)
msg &= vbCrLf & "Year" & vbTab & "Linear" & vbTab & "Doubling" & vbCrLf

' Use the SYD and DDB functions to calculate the deprecation for each year.
For DepYear = 1 To LifeTime
    msg &= DepYear & vbTab & 
        Format(SYD(InitCost, SalvageVal, LifeTime, DepYear), Fmt) & vbTab & 
        Format(DDB(InitCost, SalvageVal, LifeTime, DepYear), Fmt) & vbCrLf
Next
MsgBox(msg)

注解

参数LifePeriod必须以相同的单位表示。 例如,如果 Life 以月为单位, Period 则还必须以月为单位提供。 所有参数都必须是正数。

适用于

另请参阅