WorksheetFunction.SumX2MY2 Method
Returns the sum of the difference of squares of corresponding values in two arrays.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function SumX2MY2 ( _
Arg1 As Object, _
Arg2 As Object _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Object
Dim Arg2 As Object
Dim returnValue As Double
returnValue = instance.SumX2MY2(Arg1, _
Arg2)
double SumX2MY2(
Object Arg1,
Object Arg2
)
Parameters
Arg1
Type: System.ObjectArray_x - the first array or range of values.
Arg2
Type: System.ObjectArray_y - the second array or range of values.
Return Value
Type: System.Double
Remarks
The arguments should be either numbers or names, arrays, or references that contain numbers.
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 array_x and array_y have a different number of values, SumX2MY2returns the #N/A error value.
The equation for the sum of the difference of squares is:
Figure 1: Equation for the sum of the difference of squares