Excel - CORREL Function



CORREL Function

The concept of correlation is one of the prominent terms in Statistical measurement. It is used to identify the relationship between two or more fields. The Excel CORREL function evaluates the correlation coefficient between two arrays. This coefficient may be nonpositive, nonnegative, or zero. Its value must reside between -1 and +1. The correlation coefficient 0 means no correlation between the two defined arrays. A positive correlation occurs if the correlation coefficient value is positive, and a negative correlation is obtained if the correlation coefficient value is negative like -.06.

Additionally, you might use the Data Analysis Toolpack's Pearson function to find the Correlation Coefficient between independent variables.

Compatibility

This advanced Excel function is compatible with the following versions of MS-Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the CORREL function is as follows −

=CORREL(array1, array2)

Arguments

You can use the following arguments with the CORREL function −

Argument Description Required/Optional
Array1 A specific range of cells. Required
Array2 Another range of cells. Required

Points to Remember

  • If Arrays1 and Array2 are of different dimensions, then the CORREL function will retrieve the #N/A error.
  • When Boolean, blank, or text values are present in any of the arguments, the CORREL function will ignore them. Zero values will be included in the function evaluation.
  • If any of the arguments are empty, the CORREL function will return the #DIV/0! error.

Examples of CORREL Function

Practice the following examples to learn the use of the CORREL function in Excel.

Example 1: How to determine the Correlation Coefficient in Excel?

In this example, we will find out the correlation between two cell ranges titled Average Temperature and Air Conditoner using the CORREL function.

Solution

Assume the sample dataset, where the Month, average Temperature, and Air Conditioner sales values are displayed in the ranges B3:B8, C3:C8, and D3:D8.

CORREL Function

Step 1 − After that, enter the formula =CORREL(C2:C7,D2:D7) in the D8 cell.

CORREL Function 1

Hence, the CORREL function will retrieve the 80.01%.

CORREL Function 2

Example 2

If Arrays1 and Array2 are of different dimensions, then the CORREL function will retrieve the #N/A error.

Solution

You may enter the formula =CORREL({2,3,5}, {6,7,8,3}) in the B2 cell and press Enter. The number of data points varies in two arrays.

CORREL Function 3

Hence, the CORREL function yields an #N/A error.

CORREL Function 4

Example 3

When Boolean, blank, or text values are present in any of the arguments, the CORREL function will ignore them. Zero values will be included in the function evaluation.

Solution

First, double click on the B3 cell and write the formula =CORREL({32,0.2,0.5,TRUE,"India"}, {27,0.7,0.8,FALSE,0}). In this expression, the Boolean values TRUE and India text are ignored, and in the second array, the FALSE is ignored, and 0 is included.

CORREL Function 5

Hence, the CORREL function returns the .999988.

CORREL Function 6

Example 4

If any of the arguments are empty, the CORREL function will return the #DIV/0! error.

Solution

Consider the sample dataset, where data points are not presented in Array 1 and the data points are defined in Array 2, as depicted in the cell range C3:C7. Enter the formula =CORREL(B3:B7,C3:C7) in the C8 cell.

CORREL Function 7

Once you hit the Enter, the resulting value is #DIV/0!.

CORREL Function 8

Download Practice Sheet

You can download and use the sample data sheet to practice the CORREL function.

Advertisements