Financial.SLN(Double, Double, Double) メソッド

定義

1 つの期間の資産の定額減価償却費を指定する値を返します。

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

パラメーター

Cost
Double

必須。 資産の初期コスト。

Salvage
Double

必須。 耐用年数の終了時の資産の価値。

Life
Double

必須。 資産の耐用年数の長さ。

返品

1 つの期間の資産の定額減価償却費。

例外

Life = 0。

この例では、 SLN 関数を使用して、資産の初期コスト (InitCost)、資産の耐用年数の終了時の回収額 (SalvageVal)、資産の総耐用年数 (LifeTime) を指定して、1 つの期間の資産の定額減価償却費を返します。

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)

注釈

減価償却期間は、 Life 引数と同じ単位で表す必要があります。 引数はすべて、正の数にする必要があります。

適用対象

こちらもご覧ください