Returns the correlation coefficient between two data sets. Correlation measures the strength and direction of the linear relationship between two variables. Values range from -1 to +1. Essential for data analysis, relationship assessment, regression analysis, and understanding variable dependencies.
Master the fundamentals of Excel CORREL function
The CORREL function returns the correlation coefficient (Pearson correlation) between two data sets. Correlation measures the strength and direction of the linear relationship between two variables. Returns values from -1 to +1: +1 indicates perfect positive correlation (both variables increase together), -1 indicates perfect negative correlation (one increases as other decreases), 0 indicates no linear correlation. Both arrays must have the same number of values. Essential for relationship analysis, regression analysis, data science, finance (risk analysis), and statistical research.
Perfect negative to perfect positive
Measures linear correlation only
Both arrays must match
CORREL = PEARSON
Function-specific parameters
Function-specific return type
Measure variable relationships
Asset correlation and risk
Correlation before regression
Statistical research and analysis
Exact matching required
Returns numeric position
Handles missing text gracefully
=CORREL(array1, array2)First array or range of dependent data values.
Second array or range of independent data values.
Correlation coefficient (-1 to +1)
Description: Returns the correlation coefficient between two data sets
Calculate correlation between two sets
Returns 1 because there is perfect positive correlation. When x increases, y increases proportionally. Perfect linear relationship.
Use CORREL function in VBA
' Basic CORREL in VBA
Range("C1").Value = Application.WorksheetFunction.Correl(Range("A1:A10"), Range("B1:B10"))
' Returns: Correlation coefficient
' Calculate correlation
Sub CalculateCorrelation()
Dim correlValue As Double
correlValue = Application.WorksheetFunction.Correl(Range("A1:A10"), Range("B1:B10"))
Range("C1").Value = correlValue
End Sub
' Check correlation strength
Sub CheckCorrelationStrength()
Dim correlValue As Double
correlValue = Application.WorksheetFunction.Correl(Range("A1:A10"), Range("B1:B10"))
Dim strength As String
If Abs(correlValue) >= 0.7 Then
strength = "Strong"
ElseIf Abs(correlValue) >= 0.3 Then
strength = "Moderate"
Else
strength = "Weak"
End If
Range("C1").Value = "CORREL: " & correlValue & " (" & strength & ")"
End Sub
' Compare CORREL with PEARSON
Sub CompareCorrelPearson()
Dim correlValue As Double
Dim pearsonValue As Double
correlValue = Application.WorksheetFunction.Correl(Range("A1:A10"), Range("B1:B10"))
pearsonValue = Application.WorksheetFunction.Pearson(Range("A1:A10"), Range("B1:B10"))
Range("C1").Value = "CORREL: " & correlValue
Range("C2").Value = "PEARSON: " & pearsonValue
' Should be equal
End Sub
' Multiple correlation analysis
Sub MultipleCorrelations()
Dim correl1 As Double
Dim correl2 As Double
' Correlation between A and B
correl1 = Application.WorksheetFunction.Correl(Range("A1:A10"), Range("B1:B10"))
' Correlation between A and C
correl2 = Application.WorksheetFunction.Correl(Range("A1:A10"), Range("C1:C10"))
Range("D1").Value = "A-B: " & correl1
Range("D2").Value = "A-C: " & correl2
End SubMeasure variable relationships
Asset correlation and risk assessment
Correlation before regression
Statistical research and analysis
CORREL returns #N/A
Ensure both arrays have same number of valuesSolution: Both arrays must have the same number of values. Check array sizes match. Also, if arrays have constant values (all same), CORREL may return error. Ensure at least some variation in data.
CORREL returns #DIV/0!
Check arrays have variation (not all same values)Solution: This occurs when one or both arrays have zero variance (all values identical). CORREL cannot calculate when there is no variation. Check data has variation in both arrays.
Uncertainty about correlation values
Strong: |r|≥0.7, Moderate: 0.3≤|r|<0.7, Weak: |r|<0.3Solution: Interpretation: ±0.7-1.0 = strong, ±0.3-0.7 = moderate, ±0.0-0.3 = weak. Sign indicates direction: + = positive (increase together), - = negative (inverse).
Uncertainty about difference
CORREL = PEARSON (identical functions)Solution: CORREL and PEARSON are identical functions. Both calculate Pearson correlation coefficient. CORREL(array1, array2) = PEARSON(array1, array2). Use either one.