SLN Function

Description

Returns the straight-line depreciation of an asset for a single period.

Syntax

SLN(cost, salvage, life)

The SLN 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.


Remarks

The period for which the depreciation is returned is expressed in the same unit of time as the useful life of the asset. All arguments must be positive numbers.

Example

This example uses the SLN function to return the straight-line depreciation of an asset for a single 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).


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 useful 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= SLN(InitCost, SalvageVal, LifeTime)"The depreciation is " & Format(PDepr, Fmt) & " per year."