Your code is correct but it gives the value if cumulative is false.
The excel example gives the value when cumulative is true.
I don't have your function in my Excel version, just simlated it with a similar function and setting mu to zero and sigma to one.
Hope this helps a bit.
Reputation Points: 2035
Solved Threads: 644
Senior Poster
Offline 3,740 posts
since Oct 2008