Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

會返回 Double,指定資產在單一週期的直線折舊。

語法

SLN (、 salvage, life)

SLN 函數具有這些引數:

引數

描述

成本

必要。 重複 指定資產的初始成本。

打撈

必要。 資產生命週期結束時,重複指定資產的價值。

生活

必要。 倍指定資產有效生命週期的長度。

註解

折舊期間必須以與生命週期相同的單位引數。 所有引數都必須是正數。

查詢範例

運算式

結果

SELECT SLN ([LoanAmount],[LoanAmount]*.1,20) AS Expr1 FROM FinancialSample;

根據資產的使用期限為 20 年,將價值為 10% ("LoanAmount" 乘以 0.1) 的資產,會針對價值為 "LoanAmount" 的資產,將折舊計算為 20 年。

SELECT SLN ([LoanAmount],0,20) AS SLDepreciation FROM FinancialSample;

根據資產的使用期限為 20 年,會針對價值為 "LoanAmount" 的資產,將價值為 $0 的折舊計算回折舊。 結果會顯示在 SLDepreciation 欄中。

VBA 範例

附註: 下列範例示範如何在 Visual Basic for Applications (VBA) 模組中使用此函數。 如需使用 VBA 的詳細資訊,請在 [搜尋] 旁的下拉式清單中選取 [開發人員參考],並在 [搜尋] 方塊中輸入一個或多個字詞。

此範例使用 SLN 函數,根據資產的初始成本 (InitCost) 、資產有效生命週期結束時的終值 (SalvageVal) ,以及資產在 (LifeTime) 年的總生命週期,將資產單一週期的直線折舊退回。

Dim Fmt, InitCost, SalvageVal
Dim 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?")
' Ensure period is >= 1 year.
Do While MonthLife < YEARMONTHS
MsgBox "Asset life must be a year or more."
MonthLife = InputBox("What's the asset's " & _
"useful life in months?")
Loop
' Convert months to years.
LifeTime = MonthLife / YEARMONTHS
If LifeTime <> Int(MonthLife / YEARMONTHS) Then
' Round up to nearest year.
LifeTime = Int(LifeTime + 1)
End If
PDepr = SLN(InitCost, SalvageVal, LifeTime)
MsgBox "The depreciation is " & _
Format(PDepr, Fmt) & " per year."

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Office Insiders

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?

Thank you for your feedback!

×