+ Reply to Thread
Results 1 to 7 of 7

Can I select an array for a correlation based on a value in a column? STUMPED!

  1. #1
    Registered User
    Join Date
    04-23-2014
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Can I select an array for a correlation based on a value in a column? STUMPED!

    Hi
    I am calculating multiple Correlations for long lists of data. I want the correlation based on the value in a given column. In the below example I would like a different correlation for each value in colA and the correlation will be between colC and colD. ColB lists the different people whose data are used for the correlations. In actuality there are 30 or more people for each test. In every case ColC is the same for a given value of ColB (although I doubt that matters). The number of people taking each test varies. I would like a correlation of ColC an ColD for each value of ColA.
    Thanks!

    Simplified version of my data

    ColA ColB ColC ColD
    Test1 Fred .75 1
    Test1 Max .80 0
    Test1 Sara .90 1
    Test2 Fred .75 1
    Test2 Max .80 1
    Test2 Sara .90 0
    ....
    Test100 Fred .75 1
    Test100 Max .80 1
    Test100 Sara .90 1

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Can I select an array for a correlation based on a value in a column? STUMPED!

    Put "testx" in cell H1, and this formula should give you the related correlation:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Please click the * icon below if I have helped.

  3. #3
    Registered User
    Join Date
    04-23-2014
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Can I select an array for a correlation based on a value in a column? STUMPED!

    It worked amazingly! Any chance you know how I could also calculate N for each test?

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Can I select an array for a correlation based on a value in a column? STUMPED!

    You'll have to define N for me, as well as how you would manually calculate it.

    This formula will give you the # of individuals who took that test, if that is what you mean:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-23-2014
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Can I select an array for a correlation based on a value in a column? STUMPED!

    I am still having trouble with the function, I thought it was working but the calculations are off, I am wondering if you could explain your choice of numbers for the offset function? Is it possible that I have placed the formula in the wrong cell? I have four columns of data, col1 is the group, col3 and col4 need to be correlated with each other based on the value for col1. I am getting some div/o errors even though when I manually do the correlations I get a value, and also I am getting different calculations manually than the formula provides. I have place the formula in colG and the name for each group in colH.

  6. #6
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Can I select an array for a correlation based on a value in a column? STUMPED!

    Can you upload a sample workbook with some mock numbers, as well as pointing out a couple examples where ___ is what the formula returns, and you manually calculate ______.

  7. #7
    Registered User
    Join Date
    04-23-2014
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Can I select an array for a correlation based on a value in a column? STUMPED!

    Hi
    I figured it out thanks to pp's help and some trial and error
    1) do a countif function to get the total number of rows for a given question in column F
    2) do a countif function that adds one if the question is the same as the question in the row above, else make it one
    3) sort so you only see the first row per question, then paste this formula
    4) =CORREL(OFFSET(A2,0,1,F2,1),OFFSET(A2,0,2,F2,1))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 11-28-2013, 09:21 PM
  2. Correlation with Specific Array Criteria
    By grpxl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2013, 06:51 AM
  3. Select Array Based on Criteria
    By excelsf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2010, 06:04 PM
  4. Correlation Function on Array
    By Paul987 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2010, 02:30 PM
  5. [SOLVED] Stumped on Array
    By Otto Moehrbach in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-13-2005, 12:05 PM

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