PDA

View Full Version : Solved: Multiple Questions (Chiinv function & dragging cells)



Tuneman12
03-17-2009, 01:11 PM
Hi

I am have a little difficulty with a few excel vba things.

Firstly I am trying to run CHITEST function on two colums of data. It keeps coming up as #NUM. Both rows are the same length... I don't get whats wrong.




Also,



I get a "AutoFill method of Range class failed" when I run this module:

Sub Macro2()

Dim x
x = 2

Do While x < 3710

If Range("C" & x) = "" Then
Range("B" & x).AutoFill Destination:=Range("R" & x), Type:=xlFillDefault

End If

x = x + 1

Loop

End Sub


Any help would be appreciated.

Bob Phillips
03-17-2009, 01:16 PM
When you autofill, the destination range has to include the source range.

mdmackillop
03-17-2009, 01:50 PM
Hi Tuneman,
Welcome to VBAX
When you post code, select it and click the green VBA button to format it as shown.

Tuneman12
03-17-2009, 01:57 PM
Terribly sorry about that. Thank you.

And thanks for that catch xld!

Anyone know whats going on with the CHITEST Function?

mdmackillop
03-17-2009, 02:07 PM
I don't know CHITEST. Can you post a sample workbook? Use Manage Attachments in the Go Advanced reply section.

Bob Phillips
03-17-2009, 02:22 PM
I did a simple test with CHITEST on two equal sized ranges, and it returned an answer (no idea if it is right or not).

Tuneman12
03-17-2009, 03:44 PM
Ok thanks so much. It is attached.

The CHITEST formula is all the way at the bottom in red, and the two colored columns are the ones that are being tested.

Sometimes they come up with numbers, sometimes it gives me an error. Its very strange...

Thanks in advance

Sagy
03-18-2009, 12:14 PM
Ok thanks so much. It is attached.

The CHITEST formula is all the way at the bottom in red, and the two colored columns are the ones that are being tested.

Sometimes they come up with numbers, sometimes it gives me an error. Its very strange...

Thanks in advance
This might have to do with the values you are passing to the ChiTest function. I know that ChiDist requires that the value passed is positive. Can it be that ChiText has other like limitations?

Tuneman12
03-24-2009, 07:31 AM
yes I think you're right. Also it seems that values should be greater than 5 for the chitest to be useful. Thanks for the help.

Tuneman12
03-24-2009, 07:32 AM
.