One way:
Public Function foo(n As Double, d As Double, z As Double) As Double
Dim i As Long
For i = 1 To n
foo = foo + d ^ (i - 1) * z ^ (n - i + 1)
Next i
End Function
If you're not familiar with UDFs, see David McRitchie's "Getting Started
with Macros and User Defined Functions":
http://www.mvps.org/dmcritchie/excel/getstarted.htm
In article , "Manfred"
wrote:
Hi
how can I program that formular in Excel:
sum i = 1 to n from d^(i-1)*z^(n-i+1)
or have anybody an idea to describe that with a function f(n,d,z)?
Thanks in advance
Manfred