Circular References Macro Workout
- 03:43
Circular References Macro in renewable energy project finance workout.
Glossary
Project finance Renewable EnergyTranscript
If you open up circularity workout with macro, you'll see there's no circularity. There's no warning, no blue arrows, nothing down in the gray area at the bottom warning about a circular reference cell. Why is that? Because the interest calculation that we have got here on this line, 31 doesn't go anywhere into the model. This line here that's highlighted in green is the one that is linked into the interest here, and right now it is blank.
If we were to take those numbers, copy them, and then we'd go home, paste values into the green light and you can see once that's calculated, we now have 1000 of CapEx a hundred of interest. Therefore we need to draw 1100 of debt and therefore the interest calculation has changed to 110 and we've only got a hundred in that cell there and therefore we are out not by a hundred anymore by a smaller amount, by only 10, and we'd have to copy and paste again. What we could do is set up a macro to do what we did before.
I have set up this area here as a range name. It's got a name on it. Those four cells together are known as interest copy. All I did was highlighted them, click in the name box and then type in a name, interest copy. I've done the same for the green cells. Those four green cells above that are blank. I've given them a name interest.
What the macro is going to do is take these numbers that are in interest, copy and place them as values in the area called interest, and then it will do it again and again and again. And each time that it does it, this difference should get lower and lower and lower. Let's try that. If I click on the macro button and you can see there that did it very quickly, indeed, way faster than you and I could do it, and that has resolved our circular reference. These numbers here are now the same as these numbers here and that's the interest calculation in there. And the debt drawdown is now correct for the amount of capital expenditure and interest that we need to incur. The only problem is that we have to remember to do the macro each time, but here's how we remember that this is a bunch of errors. If we have an errors sheet in our model or some sort of reference to alert us to the fact that these numbers are non-zero, then that's a reminder that we need to then rerun the macro and that will happen anytime that this is blanked out or any time that we need to update any of our assumptions.
I'll just do it once more to show you how fast it works. There we go. And if I then changed, say the capital expenditure to 1,200 a year, and you can see there again, now we're back into an error situation. The amount of interest calculated is not the amount that's in the model. Then I need to copy and paste interest calculation again. It does it very fast and now it's updated everything. So this line here, that differences line is the one that alerts you to the fact that this hasn't been updated and you need to rerun the macro.