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

Required. 資產的初始成本。

Salvage
Double

Required. 資產在使用壽命結束時的價值。

Life
Double

Required. 資產的使用壽命長度。

Period
Double

Required. 計算資產折舊的期間。

傳回

資產在特定期間內的年度總和折舊。

例外狀況

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 則 也必須以月份為單位。 所有參數必須為正數。

適用於

另請參閱