Skip to content

Instantly share code, notes, and snippets.

Sub CalculateDepreciation()
' Clear previous output
Range("B12:F1000").ClearContents
' Read input values
Dim Asset As String
Dim Cost As Double, Residual As Double, Life As Double, Rate As Double
Dim Method As String, UnitsProduced As Double, TotalUnits As Double
Asset = Range("B2").Value