Reputation: 325
I need to use statistic function in my VBA code but unfortunately error 1004 appears when I try to use built excel function.
My code:
Dim pValue() As Double
ReDim pValue(number - 1)
For i = 0 To number - 1
pValue(i) = WorksheetFunction.T_Inv_2T(Abs(StatT(i)), 17)
Next
And StatT Array consists of elements [10,82;-9,12;3,19]
Please help.
Upvotes: 0
Views: 58
Reputation: 29421
probability must be between 0 and 1:
pValue(i) = WorksheetFunction.T_Inv_2T(Abs(StatT(i) * 0.01), 17)
Upvotes: 2