The VBA SYD function calculates the sum-of-years' digits depreciation for a specified period in the lifetime of an asset.
The syntax of the function is:
Where the function arguments are:
|Salvage||-||The value of the asset at the end of its useful life.|
|Life||-||The number of periods over which the asset is to be depreciated.|
|Period||-||The period number for which you want to calculate the depreciation.|
' Calculate the yearly depreciation of an asset that cost $10,000 at' Calculate the depreciation during year 5
' the start of year 1, and has a salvage value of $1,000 after 5 years.
Dim syd_yr1 As Double
Dim syd_yr2 As Double
Dim syd_yr3 As Double
Dim syd_yr4 As Double
Dim syd_yr5 As Double
syd_yr5 = SYD( 10000, 1000, 5, 5 )
' syd_yr5 is now equal to 600.
|Depreciation during year 1 = $3,000;|
Depreciation during year 2 = $2,400;
Depreciation during year 3 = $1,800;
Depreciation during year 4 = $1,200;
Depreciation during year 5 = $600.
Note that the five calculated depreciation values add up to $9,000, which, as expected, is the difference between the cost, $10,000 and the salvage value, $1,000.
The VBA SYD function produces the Run-time error '5': Invalid procedure call or argument if either: