me84
05-28-2008, 10:07 AM
hi I am trying to practice my VBA and am trying to write a "series" summation function. i.e in mathematical terms the function is...
∑(1+i)^n
so far I have the following but I do know that there is a problem with my loop which is only calculating (1+i)^n rather than summing.
Function Summation (interest as single, n as single)
Do
j = 1
Summation = (1+i)^n
j = j+1
loop until j = n
End Function
Would like to hear everyones comments/ advice
∑(1+i)^n
so far I have the following but I do know that there is a problem with my loop which is only calculating (1+i)^n rather than summing.
Function Summation (interest as single, n as single)
Do
j = 1
Summation = (1+i)^n
j = j+1
loop until j = n
End Function
Would like to hear everyones comments/ advice