+ Reply to Thread
Results 1 to 2 of 2

Conditional Correlation function

  1. #1
    Registered User
    Join Date
    04-19-2021
    Location
    Victoria,BC
    MS-Off Ver
    Microsoft 365
    Posts
    1

    Conditional Correlation function

    Hi - I am trying to calculate conditional correlations. Using the attached spreadsheet as an example the goal is to calculate the correlation of Column B and C at ranges of Column B. When Column B is <0 ; is >=0,<.5 ; etc. The formula =CORREL(IF(B$2:B$508<0,$B$2:$B$508),IF(B$2:B$508<0,C$2:C$508)) works for > than but if I try to add an AND statement for the between values it does not work. Any Suggestions would be great. Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Conditional Correlation function

    AND function cannot be used in ARRAY function.
    Instead of

    =CORREL(IF(AND(B$2:B$508>=0,B$2:B$508<0.5),$B$17:$B$523),IF(AND(B$2:B$5508>=0,B$2:B$508<0.5),C$2:C$508))

    Use ARRAY entered

    =CORREL(IF((B$2:B$508>=0)*(B$2:B$508<0.5),$B$17:$B$523),IF((B$2:B$508>=0)*(B$2:B$508<0.5),C$2:C$508))

    To enter ARRAY formula
    Copy and paste the formula in cell
    Press F2
    Press Ctrl+Shift+Enter together
    Excel covers the formula with {}.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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. Correlation formula directly from correlation matrix
    By Phil123456789 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-18-2020, 05:35 AM
  2. Conditional correlation using same column of data
    By Novak123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2020, 12:51 PM
  3. [SOLVED] Multiple Conditional Correlation
    By ncoday in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-09-2017, 05:01 AM
  4. [SOLVED] Array formula for Pearson correlation conditional on 2 criteria
    By lordmgls in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-20-2015, 07:49 AM
  5. Correlation Function
    By Stevedarby02 in forum Excel General
    Replies: 1
    Last Post: 05-03-2011, 11:51 AM
  6. Correlation Function
    By hgolf8 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-08-2010, 03:14 AM
  7. Conditional Correlation within 2 time series
    By pipsturbo in forum Excel General
    Replies: 2
    Last Post: 05-05-2009, 12:45 AM

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