# jeffreyiacono/depreciator

### Subversion checkout URL

You can clone with
or
.
Excel module that exposes a worksheet function that facilitates the depreciation of a set of capital expenditures against a given depreciation schedule.
Visual Basic

Fetching latest commit…

Cannot retrieve the latest commit at this time

# depreciator.bas

`depreciate` worksheet function facilitates the depreciation of a set of capital expenditures against a given depreciation schedule.

## Basic Usage

Import the module and use the `=depreciate` worksheet function in any cell.

The function takes two parameters:

1. `ordered_capital_expenditures`: a chronologically ordered range of capital expenditures
2. `ordered_depreciation_schedule`: the chronologically ordered depreciation schedule

Requirements:

• `ordered_capital_expenditures` must be an n x 1 or 1 x n vector
• `ordered_depreciation_schedule` must be an m x 1 or 1 x m vector

As an example, pretend it is Mar 11 and we have the following cap ex and depreciation schedule:

```   Capital Expenditures       Depreciation Schedule
---------------------      ---------------------
|   Date  |  Cap Ex |      |  Month  |  Depr % |
---------------------      ---------------------
|  Jan 11 |  \$1000  |      |    1    |   49%   |
|  Feb 11 |  \$2000  |      |    2    |   13%   |
|  Mar 11 |  \$3000  |      |    3    |    7%   |
---------------------      |   ...   |   ...   |
|    m    |    Y%   |
---------------------
```

To find the depreciated cap ex, we'd pass the following into `=depreciate(ordered_capital_expenditures, ordered_depreciation_schedule)`: note: {} denotes range selection

• `ordered_capital_expenditures` = {\$1000, \$2000, \$3000} (vector size = 3)
• `ordered_depreciation_schedule` = {49%, 13%, 7%, ... , %Y} (vector size = m)

The function will depreciate each month's cap ex by the corresponding entry in the depreciation schedule (ex. (\$3,000 * 49% + \$2,000 * 13% + \$1,000 * 7%)).

## Sample App

You can view a sample application in the `/sample` directory.

Excel Add-in is available in the `/addin` directory for easy distribution and installation.