0

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.

1
  • Nope, nothing change :( Commented Dec 8, 2016 at 17:47

1 Answer 1

2

probability must be between 0 and 1:

    pValue(i) = WorksheetFunction.T_Inv_2T(Abs(StatT(i) * 0.01), 17)
Sign up to request clarification or add additional context in comments.

1 Comment

My god... I used wrong function... Anyway your answer solve the problem. Thank You :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.