WorksheetFunction.Db Method
Returns the depreciation of an asset for a specified period using the fixed-declining balance method.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Db ( _
Arg1 As Double, _
Arg2 As Double, _
Arg3 As Double, _
Arg4 As Double, _
Arg5 As Object _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim Arg2 As Double
Dim Arg3 As Double
Dim Arg4 As Double
Dim Arg5 As Object
Dim returnValue As Double
returnValue = instance.Db(Arg1, Arg2, Arg3, _
Arg4, Arg5)
double Db(
double Arg1,
double Arg2,
double Arg3,
double Arg4,
Object Arg5
)
Parameters
Arg1
Type: System.DoubleCost - the initial cost of the asset.
Arg2
Type: System.DoubleSalvage - the value at the end of the depreciation (sometimes called the salvage value of the asset).
Arg3
Type: System.DoubleLife - the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).
Arg4
Type: System.DoublePeriod - the period for which you want to calculate the depreciation. Period must use the same units as life.
Arg5
Type: System.ObjectMonth - the number of months in the first year. If month is omitted, it is assumed to be 12.
Return Value
Type: System.Double
Remarks
The fixed-declining balance method computes depreciation at a fixed rate. DB uses the following formulas to calculate depreciation for a period:
(cost - total depreciation from prior periods) * rate
where:
rate = 1 - ((salvage / cost) ^ (1 / life)), rounded to three decimal places
Depreciation for the first and last periods is a special case. For the first period, DB uses this formula:
cost * rate * month / 12
For the last period, DB uses this formula:
((cost - total depreciation from prior periods) * rate * (12 - month)) / 12