Sum of squares of differences in two arrays
=SUMXMY2(array_x, array_y)
| Parameter | Description |
|---|---|
array_x |
The first range or array containing numeric values. |
array_y |
The second range or array containing numeric values. |
=SUMXMY2({0,1},{1,2})// returns 2
=SUMXMY2({1,2,3},{1,2,3}) // returns 0
In the example shown above, the formula in E5 is:
=SUMXMY2(B5:B12,C5:C12)
This formula can be created manually in Excel with the exponentiation operator (^) like this:
=SUM((range1-range2)^2)
With the example as shown, the formula below will return the same result as SUMX2MY2:
=SUM((B5:B12-C5:C12)^2) // returns 28