Skip to content

Latest commit

 

History

History
55 lines (31 loc) · 1.61 KB

Excel.WorksheetFunction.Correl.md

File metadata and controls

55 lines (31 loc) · 1.61 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
WorksheetFunction.Correl method (Excel)
vbaxl10.chm137211
vbaxl10.chm137211
Excel.WorksheetFunction.Correl
8baf1d16-ab3e-918f-ad90-90b6758ae3d9
05/22/2019
medium

WorksheetFunction.Correl method (Excel)

Returns the correlation coefficient of the Arg1 and Arg2 cell ranges.

Syntax

expression.Correl (Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 Required Variant A cell range of values.
Arg2 Required Variant A second cell range of values.

Return value

Double

Remarks

Use the correlation coefficient to determine the relationship between two properties. For example, you can examine the relationship between a location's average temperature and the use of air conditioners.

If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.

If Arg1 and Arg2 have a different number of data points, Correl generates an error.

If either Arg1 or Arg2 is empty, or if s (the standard deviation) of their values equals zero, Correl generates an error.

The equation for the correlation coefficient is as follows, where x and y are the sample means Average(Arg1) and Average(Arg2):

Formula

[!includeSupport and feedback]