Financial.SYD Method
.NET Framework 4
Returns a Double specifying the sum-of-years digits depreciation of an asset for a specified period.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
Parameters
- Cost
- Type: System.Double
Required. Double specifying the initial cost of the asset.
- Salvage
- Type: System.Double
Required. Double specifying the value of the asset at the end of its useful life.
- Life
- Type: System.Double
Required. Double specifying the length of the useful life of the asset.
- Period
- Type: System.Double
Required. Double specifying the period for which asset depreciation is calculated.
Return Value
Type: System.DoubleReturns a Double specifying the sum-of-years digits depreciation of an asset for a specified period.
| Exception | Condition |
|---|---|
| ArgumentException |
Salvage < 0, Period > Life, or Period <=0. |
This example uses the SYD function to return the depreciation of an asset for a specified period given the asset's initial cost (InitCost), the salvage value at the end of the asset's useful life (SalvageVal), and the total life of the asset in years (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)
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.