WorksheetFunction.SumXMY2 Method

Returns the sum of squares of differences 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 SumXMY2 ( _
    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.SumXMY2(Arg1, Arg2)
double SumXMY2(
    Object Arg1,
    Object Arg2
)

Parameters

  • Arg1
    Type: System.Object

    Array_x - the first array or range of values.

  • Arg2
    Type: System.Object

    Array_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, SumXMY2 returns the #N/A error value.

The equation for the sum of squared differences is:

Figure 1: Equation for the sum of squared differences

Equation for the sum of squared differences

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace