The Excel SUMX2MY2 Function

Related Functions:
SUMXMY2
SUMX2PY2

Function Description

The Excel Sumx2my2 function returns the sum of the differences of squares of two supplied sets of values. I.e.

Equation for Sum of Difference of Squares

The syntax of the Sumx2my2 function is:

SUMX2MY2( array_x, array_y )

where the array arguments are two arrays of numeric values. These two arrays must be of equal length.

Note that, if any of the values supplied to the functions are non-numeric (including text representations of numbers), these values, and the corresponding value in the other array are ignored.


Sumx2my2 Function Examples

 Formulas:
  A B C D
1 array_x array_y Sumx2my2  
2 5 3 =SUMX2MY2( A2:A4, B2:B4 )
3 2 -1 =SUMX2MY2( A2:A4, {2;1;0} )
4 3 4    
 Results:
  A B C D
1 array_x array_y Sumx2my2  
2 5 3 12 = (25-9) + (4-1) + (9-16)
3 2 -1 33 = (25-4) + (4-1) + (9-0)
4 3 4    

The above spreadsheets on the right show two examples of the Sumx2my2 function.

The functions are shown in the top spreadsheet and the resulting values are shown in the spreadsheet below.

Note that the examples spreadsheets show that the array arguments can be supplied either directly to the function or in the form of arrays of cells.


See the Microsoft Office website for further information and examples of the Excel Sumx2my2 function.


Sumx2my2 Function Error

If you get an error from the Excel Sumx2my2 Function, this is likely to be the #N/A error:

Common Error
#N/A - Occurs if the array_x and array_y arguments have different lengths (i.e. contain different numbers of values).