SUMXMY2()

Syntax. SUMXMY2(array_x,array_y)

Definition. This function returns the sum of squares of differences of corresponding values in two arrays (see Figure 16-37).

Arguments

Background. The arguments should be numbers, names, arrays, or references containing numbers.

If an array or a reference argument contains text, logical values, or empty cells, those values are ignored. However, cells with the value zero are included.

If array_x and array_y have a different number of values, the SUMXMY2() function returns the #N/A error. The equation for the sum of the squared differences is:

Σ(xy)2

The solution of this equation is built for the example (see Figure 16-37) as follows:

  1. In two specified ranges:

    • Range A: 4, 5

    • Range B: 2, 3

    The values next to each other are subtracted:

    • First value in the ranges A and B: 4 – 2

    • Second value in the ranges A and B: 5 – 3

  2. The square sums are added (see Figure 16-37):

    22 + 22 = 4 + 4 = 8

The SUMXMY2() function.

Figure 16-37. The SUMXMY2() function.

See Also

SUMPRODUCT(), SUMX2MY2(), SUMX2PY2()