This documentation is for the library labeled as: BXL 5g Functions LAMBDA Financial Models 2025. It is not backward compatible with earlier versions but easy to retrofit. If you have an older version, we recommend downloading the new version using Advanced Formula Environment from here: https://gist.github.com/CHatmaker/472f65269519a0937b03f741e9271334
This function is designed to calculate and return a depreciation schedule for one or more assets across a given timeline. For each asset it outputs these rows adapted to your model's timeline:
Asset Cost
Opening Value
Depreciation
Salvage
Book Value
Net Sale/(Cost)
Gain/(Loss
Depreciateλ can be used in any Financial model, including non-dynamic array models.
With this function, adding depreciation schedules is incredibly easy and it can easily reduce potential model risk by a factor of thousands to one. It takes about 2 minutes as the video below demonstrates.
Depreciation Schedule
This function provides a complete depreciation schedule for all assets over the model's timeline. For each asset it includes separate rows for:
Acquisition Cost
Opening Book Value
Less Depreciation
Less Salvage Value
Closing Book Value
Net Disposal Sale/(Cost)
Gain/(Loss)
Depreciation Methodology
We packed several of Excel's depreciation methods into this one function which are:
SLN Straight Line Depreciation Daily
SYD Sum of Year's Digits
DB Declining Balance
DDB Double Declining Balance
VDB Variable Declining Balance
MACRS Modified Accelerated Cost Recovery System
...and then modified them to behave properly in Financial Models:
The DB method (Declining Balance) works properly when there is no salvage value.
Monthly and quarterly depreciation always totals annual depreciation.
In the last period, any amount over salvage is depreciated.
Depreciateλ() adjusts to our model's timeline, whether that be in years, months, or quarters. It also places the results with respect to the model timeline's start date, and the asset's in-service date so depreciation can start anywhere within the timeline, or even outside the timeline.
Individual Asset, Asset Classes, All Assets at Once
This function accommodates several approaches to asset depreciation.
We can depreciate each asset individually using the Depreciateλ() function for each asset.
We can aggregate assets by class and use the Depreciateλ() over the aggregated values as long as all assets share the same in-service date, life in years, and depreciation method.
We can place assets in a table and process the entire table, and thus all assets, with one Depreciateλ() function in one cell. Each asset can have its own in-service date, life in years, aquisition value, salvage value, disposal costs, and depreciation method. One function, in one cell for all assets over the model's entire timeline.
A Suite of Functions
The depreciation suite includes:
Depreciateλ( )
Produces a dynamic array containing amounts by model period for CAPEX, depreciation, book value, sale-of-asset revenue, and cost-to-dispose.
DepreciateLabelsλ( )
Adds labels to Depreciateλ( )'s results
DepreciateSumsλ( )
Totals depreciation, revenue and expense rows
SumContainsλ( )
When processing more than one asset, use this to create a single row of period totals for all CAPEX amounts, or all depreciation amounts, all book values, all revenue from sales values, and disposal cost values. These rows can then be added to finanical statements where needed.
Produces a depreciation schedule dynamic array. The array contains only values, no row labels. To Add row labels use LabelDepreciateλ().
Depreciateλ( Timeline, EndDates?, AssetCosts, InServiceDates, LifeInYears, [SalvageValues], [DisposalDates], [NetDisposals], [Methods], [Factors])
Timeline
(Required) The model's timeline.
EndDates?
(Optional) TRUE if timeline uses end dates, FALSE if start dates. Default = TRUE.
AssetCosts
(Required) Acquisition cost for each asset.
InServiceDates
(Required) When depreciation starts for each asset.
LifeInYears
(Required) Useful life, in years, for each asset.
SalvageValues
(Optional) Residual value at end of life. Default is no value (0).
DisposalDates
(Optional) When asset is removed. The default is at end of life.
NetDisposals
(Optional) The net of revenue from the sale of each assets less estimated costs for disposing of them. The default is the salvage value.
Methods
(Optional) The desired depreciation method. The default value is straight line depreciation method. We can choose from any of these:
SLN Straight Line Depreciation Daily
SYD Sum of Year's Digits
DB Declining Balance
DDB Double Declining Balance
VDB Variable Declining Balance
MACRS Modified Accelerated Cost Recovery System
Factors
(Optional) The default is 2 and is only applicable to DDB and VDB methods.
Adds row labels to the result of Depreciateλ()
LabelDepreciateλ( AssetNames)
AssetNames
(Required) The names of each asset being depreciated
Adds row Totals to the result of Depreciateλ()
DepreciateSumsλ( DepreciationSchedule)
DepreciationSchedule
(Required) The result of Depreciateλ()
Placement: We recommend creating the depreciation schedule on its own worksheet because this function will expand down when asked to process multiple assets at one time. Further, it should be placed below totals so we do not have to reposition totals if we add or remove assets from our model.
Totals: We recommend using 5g function SumContainsλ() to create totals and then reference these totals in calculations. SumContainsλ() totals those values whose labels contain a unique letter, word or phrase. The syntax is:
SumContainsλ( ValuesArray, LabelsArray, TextInLabel )
In the example below, cell J10 contains the formula =SumContainsλ(J29#, E29#, E10) where:
J29# contains the array of values produced by Depreciateλ().
E29# contains the array of labels produced by LabelDepreciateλ( )
E10 contains the text CAPEX
SumContainsλ() then finds all labels that contain CAPEX and totals the values for those labels.
Asset Cost
If the asset's in service date coincides with the acquisition date, this can be used in modeling as CAPEX. Capital Expenditures reduces cash on hand (Cash Flow Statement)
Rev (Exp) Sale of assets
Impacts operating revenue/(expense) in EBITDA in our Income Statement. EBITDA also impacts Net Income.
Depreciation
Depreciation is an expense that reduces our tax liability which impacts Net Income. Net Income impacts our Income Statement and Retained Earnings in our Balance Sheet
Net Income without depreciation impacts our Cash Flow Statement.
Book Value
Increases our Fixed Assets in our Balance Sheet.