PDA

View Full Version : VBA and Depreciation



Whitley
03-16-2013, 01:32 AM
I'm a Vba newbie. Scoured the net, purchased and waded through Wallenbach's tome but am completely stumped by the following. Mind you, I can do this in excel, but can't seem to figure out how to do it in vba.
I created a Userform that completes column headings A:J. But I can't figure out how to relate an asset's EDate (useful Life end date) to a given fiscal year end date beginning in L2, so that
A. If the fiscal year is less than the Edate, copy annual depreciation from column J to those columns.
B. If the fiscal year and EDate date difference is less than 12 months, divide annual depreciation by the difference in months and post in the appropriate column.
C. If the fiscal year is greater than the EDate, return 0.

Any help is greatly appreciated.