Related Function:

The SUMXMY2 function returns the sum of squares of differences of corresponding values in two arrays.

Syntax

=SUMXMY2(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   =SUMXMY2(A2:A5,B2:B5) 98 Sum of squares of differences of the two arrays
3 9 6   =SUMXMY2(A2:A5,{2,5,3,7}) 102 Sum of squares of differences of the 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 squared differences is:   

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