Financial.SLN(Double, Double, Double) Metodo

Definizione

Restituisce un valore che specifica l'ammortamento lineare di un cespite per un singolo periodo.

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

Parametri

Cost
Double

Required. Costo iniziale dell'asset.

Salvage
Double

Required. Valore dell'asset alla fine della sua vita utile.

Life
Double

Required. Lunghezza della vita utile dell'asset.

Valori restituiti

Ammortamento lineare di un cespite per un singolo periodo.

Eccezioni

Life = 0.

Esempio

In questo esempio viene usata la SLN funzione per restituire l'ammortamento lineare di un bene per un singolo periodo in base al costo iniziale dell'asset (InitCost), il valore di recupero alla fine della vita utile dell'asset (SalvageVal) e la durata totale dell'attività in anni (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)

Commenti

Il periodo di ammortamento deve essere espresso nella stessa unità dell'argomento Life . Tutti gli argomenti devono essere numeri positivi.

Si applica a

Vedi anche