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