SYD 関数

適用先
Access for Microsoft 365 Access 2021 Access 2019 Access 2016

特定の期間における級数法を浮動小数点型 (Double) で返します。

構文

SYD(コスト、残存、寿命、期間)

SYD 関数の構文には、次の引数があります。

引数 説明
cost 必須です。 資産の初期コストを示す倍精度浮動小数点型。
salvage 必須です。 耐用年数が終了した時点での資産の価格を示す倍精度浮動小数点型。
life 必須です。 資産の耐用年数の長さを示す倍精度浮動小数点型。
period 必須です。 資産の減価償却の計算期間を示す倍精度浮動小数点型。

解説

寿命と期間の引数は同じ単位で表す必要があります。 たとえば、 生命 が月単位で与えられた場合、 期間 も月単位で与えられなければなりません。 引数はすべて、正の数にする必要があります。

クエリの例

Expression 結果
SELECT SYD([LoanAmount],[LoanAmount]*.1,20,2) AS Expr1 FROM FinancialSample; 資産の耐用年数を 20 年と見なして、残存価額を 10% (「LoanAmount」に 0.1 を掛けたもの) の資産の減価償却費を計算します。 減価償却費は 2 年目に計算されます。
SELECT SYD([LoanAmount],0,20,3) AS SLDepreciation FROM FinancialSample; 資産の耐用年数を 20 年と見なして、残存価額 "LoanAmount" と評価された資産の減価償却費を $0 に戻します。 結果は SLDepreciation 列に表示されます。 減価償却費は 3 年目に計算されます。

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) & "."