I am trying to replicate a depreciation calculator that was previously done in Excel with formulas. Essentially, I have a list of approximately 100+ assets and I want to calculate the Current Year Expense, YE NBV, and Straight Line Depreciation for each year of those assets' lives. Due to half year double declining balance depreciation, the calculations are a bit more complicated and are dependent on the prior year being calculated before you can calculate the current year so multi-row formulas were not working for me. I'm currently trying to create an iterative macro that will perform the calculations one row at a time but I'm having issues getting it to loop. I am brand new to iterative macros and have been trying to research how to set them up but all the examples I'm seeing are different than what I need. I would appreciate any help regarding how to correctly set up my iterative macro or ideas of other ways to go about this if I'm missing something.
Thank you in advance for your help!
Attached is...
- Input Excel file
Only one asset is currently shown for simplicity. Year 1 calculations as well as the duplication of rows for the number of years of life were all added in as part of a workflow to set up the data in preparation for the iterative macro loop calculations to be done.
- Alteryx Macro workflow
This workflow does not include all the necessary calculations yet. I was just trying to get the loop to work correctly before adding in all the details.
- Screenshot of Depreciation Calculator in Excel
This is just to show what the expected values would be