Returns the sum-of-years’ digits depreciation of an asset for a specified period.
SYD(cost, salvage, life, per)
The SYD function has these named arguments:
Part |
Description |
cost |
Initial cost of the asset. |
salvage |
Value of the asset at the end of its useful life. |
life |
Length of the useful life of the asset. |
per |
Period for which asset depreciation is calculated. |
The arguments life and per must be expressed in the same units. For example, if life is given in months, per must also be given in months. All arguments must be positive numbers.
Using the sum-of-years’ digits method, this example illustrates the use of 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). The period for which the depreciation is calculated is PDepr, also in years.
Const YEARMONTHS = 12 ' Number of months in a year.= "###,##0.00" ' Define money format.= InputBox("What's the initial cost of the asset?")= _ InputBox("What's the asset's value at the end of its life?")= InputBox("What's the asset's useful life in months?")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?")= MonthLife / YEARMONTHS ' Convert months to years.LifeTime <> Int(MonthLife / YEARMONTHS) Then LifeTime = Int(LifeTime + 1) ' Round up to nearest year.If= CInt(InputBox("For which year do you want depreciation?"))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?"))= SYD(InitCost, SalvageVal, LifeTime, DepYear)"The depreciation for year " & DepYear & " is " _ & Format(PDepr, Fmt) & "."