WorksheetFunction.SumX2PY2 Method

Returns the sum of the sum of squares of corresponding values in two arrays. The sum of the sum of squares is a common term in many statistical calculations.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function SumX2PY2 ( _
    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.SumX2PY2(Arg1, _
    Arg2)
double SumX2PY2(
    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, SumX2PY2 returns the #N/A error value.

The equation for the sum of the sum of squares is:

Figure 1: Equation for the sum of the sum of squares

Equation for the sum of the sum of squares

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace