Skip to main content

VDB

Returns the depreciation of an asset for any specified period, including partial periods, using the double-declining balance method or some other method specified.

Syntax

expression.VDB(arg1, arg2, arg3, arg4, arg5, arg6, arg7);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe initial cost of the asset.
arg2RequiredApiRange | ApiName | numberThe salvage value of the asset at the end of its lifetime.
arg3RequiredApiRange | ApiName | numberThe number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).
arg4RequiredApiRange | ApiName | numberThe starting period for which the depreciation will be calculated, in the same units as the useful life of the asset.
arg5RequiredApiRange | ApiName | numberThe ending period for which the depreciation will be calculated, in the same units as the useful life of the asset.
arg6OptionalApiRange | ApiName | numberThe rate at which the balance declines. If it is omitted, the function will assume it to be 2
arg7OptionalApiRange | ApiName | booleanSpecifies whether to use straight-line depreciation when depreciation is greater than the declining balance calculation (false or omitted). If it is set to true, the function uses the declining balance method.

Returns

number

Example

This example shows how to return a depreciation of an asset for any specified period, including partial periods, using the double-declining balance method or some other method specified.

// How to estimate depreciation of an asset for any specified period.

// Use a depreciation of an asset for any specified period including partial periods.

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.VDB(3500, 500, 5, 1, 3, 2, false));