Función SLN

Devuelve un tipo Double que especifica la depreciación con amortización lineal de un activo durante un único período.

Sintaxis

SLN(cost, salvage, life)

La función SLN tiene estos argumentos con nombre:

Parte Descripción
Costo Obligatorio. Valor Double que especifica el coste inicial del activo.
Salvamento Obligatorio. Valor Double que especifica el valor del activo al final de su vida útil.
Vida Obligatorio. Valor Double que especifica la longitud de la vida útil del activo.

Comentarios

El período de amortización debe expresarse en la misma unidad que el argumento de vida. Todos los argumentos deben ser números positivos.

Ejemplo:

En este ejemplo se usa la función SLN para devolver la depreciación en línea recta de un activo durante un único período dado el costo inicial del activo (InitCost), el valor de recuperación al final de la vida útil del activo (SalvageVal) y la vida total del activo en años (LifeTime).

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

Vea también

Soporte técnico y comentarios

¿Tiene preguntas o comentarios sobre VBA para Office o esta documentación? Vea Soporte técnico y comentarios sobre VBA para Office para obtener ayuda sobre las formas en las que puede recibir soporte técnico y enviar comentarios.