The Excel SUMXMY2 function returns the sum of squares of differences between corresponding values in two arrays. The "m" in the function name stands for "minus", as in "sum x minus y squared".
SUMXMY2 takes two arguments, array_x and array_y. Array_x is the first range or array or range of numbers, and array_y is the second range or array of numbers. Both arguments can be provided as an array constant or as a range.