+ Reply to Thread
Results 1 to 6 of 6

Correlation with criteria

  1. #1
    Registered User
    Join Date
    11-05-2007
    Posts
    82

    Correlation with criteria

    Hi Guys

    I have tried searching the forum to get an answer - but thinking that the results are too complex for what i am trying to do.

    I have a set of data with various columns, A: ID, F: Unit, G: Values; the data covers multiple date ranges, across different ID's and diff units.

    On another sheet - I have 3 cells, (C4: ID, C5: ID, C6: Unit)

    I want to enter the ID's that need correlating, along with the Unit number; which will then give me the result in Cell D6.

    I have got this far - but doesn't work, and also doesn't take into consideration the Unit (my head is going to explode!)

    <Code>
    =CORREL((IF('6Months_Data'!A2:A3742='Analysis Tool'!C4,'6Months_Data'!G2:G3742)),(IF('6Months_Data'!A2:A3742='Analysis Tool'!C5,'6Months_Data'!G2:G3742)))
    <Code>

    ******** Entered as an Array ********

    Any help is greatly appreciated.

    Thanks

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Correlation with criteria

    Could you post an example worksheet? I kinda think I know what you're trying to do but I'm not sure.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  3. #3
    Registered User
    Join Date
    11-05-2007
    Posts
    82

    Re: Correlation with criteria

    Attached is a smaller version of what I am trying to do.

    I haven't got the Unit criteria yet - but would need to build this in also at some point!
    Attached Files Attached Files

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Correlation with criteria

    CORREL ignores logicals in both arrays. When there is a logical value in either, it ignores the value in the corresponding position in the other.

    There are no values in your arrays where corresponding positions are both numeric since the Metric IDs are mutually exclusive -- ergo, #DIV/0!

    I realize that doesn't solve your problem, and am pondering ...
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Contributor
    Join Date
    10-11-2007
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    251

    Re: Correlation with criteria

    I canīt create an array without blanks or logicals to use in Correl() function. I created a "Help Sheet".

    See attached workbook.
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Correlation with criteria

    Steve's approach looks good to me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1