共用方式為


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 也必須以月份提供。 所有自變數都必須是正數。

適用於

另請參閱