LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default VBA and norminv

I'm not a stats person, but would taking the StDev of the population
(StDevP) work? I am not sure what you mean by "doesn't work."

Function Dandy(P As Double, rng As Range)
Dim M As Double
Dim S As Double

With WorksheetFunction
M = .Average(rng)
S = .StDevP(rng)
Dandy = .NormInv(P, M, S)
End With
End Function


--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"ksnapp " wrote in message
...
hi

can anybody tell why this doesn't work, or better yet show me how to
make it work

Function Dandy(P As Double, rng)
Dim M As Double
M = Application.Average(rng)
Dim S As Double
S = Application.StDev(rng)

Dandy = Application.Norminv(P, M, S)
End Function

What im tryin to do is write a UDF tha replaces this
=Norminv(P, average(range), Stdev(range))


---
Message posted from http://www.ExcelForum.com/



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"