Consulting

Results 1 to 10 of 10

Thread: Solved: Multiple Questions (Chiinv function & dragging cells)

  1. #1

    Solved: Multiple Questions (Chiinv function & dragging cells)

    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:
    [VBA]
    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
    [/VBA]

    Any help would be appreciated.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    When you autofill, the destination range has to include the source range.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Tuneman,
    Welcome to VBAX
    When you post code, select it and click the green VBA button to format it as shown.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    Terribly sorry about that. Thank you.

    And thanks for that catch xld!

    Anyone know whats going on with the CHITEST Function?

  5. #5
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    I don't know CHITEST. Can you post a sample workbook? Use Manage Attachments in the Go Advanced reply section.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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).
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    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

  8. #8
    VBAX Regular
    Joined
    Feb 2009
    Posts
    16
    Location
    Quote Originally Posted by Tuneman12
    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?

  9. #9
    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.

  10. #10

    Solved: Multiple Questions (Chiinv function & dragging cells)

    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •