Function To_the_Power(ByVal Intger As Long, ByVal Ending_At As Long)
For i = 1 To Ending_At
To_the_Power = To_the_Power + (Intger ^ i)
Next i
End Function
Function To_the_Power(ByVal Intger As Double, ByVal Ending_At As Long)
For i = 0 To Ending_At
To_the_Power = To_the_Power + (Intger ^ i)
Next i
End Function
Trying to find out the nominal sum of a cash flow that grows by x% every year for a set number of years . so say i have 10 and it grows 10% a year for 2 years, it would be 10*(1.1^0+1.1^1+1.1^2)=33.1. i need to do this for much more complicated numbers. There is a equation for it but cannot remember right now and dont have enough time to figure it out. Thanks again.
anything to the power of 0, is 1.