SYD 功能

套用到
Microsoft 365 Access Access 2021 Access 2019 Access 2016

回傳一個雙重,指定資產在指定期間內的年數總和折舊。

語法

SYD (成本、打撈、生命、)

SYD 函式語法包含以下參數:

引數 描述
成本 必要。 雙重 指定資產的初始成本。
打撈 必要。 雙重 指定資產在其使用壽命結束時的價值。
生平 必要。 雙重 指定資產的使用壽命長度。
就這樣 必要。 雙重 指定計算資產折舊的期間。

註解

生命時代論證必須以相同的單位表達。 例如,如果 生命 以月份計算, 那麼週期 也必須以月份計算。 所有參數必須為正數。

查詢範例

運算式 結果
選擇 Syd ([貸款金額],[貸款金額]*.1,20,2) 作為 FinancialSample 的 Expr1; 計算資產價值為「貸款金額」的折舊,殘值為10% ( 貸款金額」乘以0.1) ,考慮資產的使用壽命為20年。 折舊計算為第二年。
選擇悉尼 ([貸款金額],0,20,3) 作為 SL 從 FinancialSample 評估; 返還資產的折舊,價值為「貸款金額」,殘值為0美元,且資產的使用年限為20年。 結果顯示在 SLDepreciation 欄位。 折舊計算為第三年。

VBA 範例

注意

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

此範例使用 SYD 函數,根據資產初始成本 () InitCost 、資產) (SalvageVal 使用壽命結束時的殘值,以及資產 (LifeTime 年) 年,在特定期間內的折舊結果。 計算 PDepr折舊的年份為 。

Dim Fmt, InitCost, SalvageVal, MonthLife, LifeTime, DepYear, 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 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 
DepYear = CInt(InputBox("For which year do you want depreciation?"))
Do 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?"))
Loop
PDepr = SYD(InitCost, SalvageVal, LifeTime, DepYear)
MsgBox "The depreciation for year " & DepYear & " is " & Format(PDepr, Fmt) & "."