Excel Formula for Sigma Equation

2020-04-02 06:11发布

问题:

How to create an excel formula for the above equation?

Eg. N = 10, P = 9.4

Thanks!

回答1:

Try the following user defined function:

Public Function Zigma(N As Long, p As Double) As Double
    Dim i As Long
    Zigma = N
    For i = 1 To N - 1
        Zigma = Zigma - (i / N) ^ p
    Next i
End Function

This allows you to avoid array formulas.



回答2:

Here it is as an excel formula:

=A1-SUMPRODUCT((ROW(A1:INDEX(A:A, A1-1))/A1)^A2)