Related Function:

The SUMX2MY2 function returns the sum of the difference of squares of corresponding values in two arrays.

Syntax

=SUMX2MY2(array_x,array_y)

Arguments

Argument Description
array_x The first array or range of values
array_y The second array or range of values

Examples

  A B C D E F
1 Array 1 Array 2   Formula Result Notes
2 3 11   =SUMX2MY2(A2:A5,B2:B5) -40 Sum of the difference of squares of the two arrays, i.e. (9-121) + (91-36) + (100-49) + (1-25)
3 9 6   =SUMX2MY2(A2:A5,{2,5,3,7}) 104 Sum of the difference of squares of two arrays; one array supplied as a set of numbers
4 10 7        
5 1 5        

Common Function Error(s)

Problem What went wrong
#N/A Occurs if the two supplied arrays have different lengths, i.e. contain different numbers of values

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

    \[    SUMX2MY2 = \sum (x^2 - y^2)    \]