Sum of difference of squares in two arrays
=SUMX2MY2(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. |
=SUMX2MY2({0,1},{1,2}) // returns -4
=SUMX2MY2({1,2,3},{1,2,3}) // returns 0
In the example shown above, the formula in E5 is:
=SUMX2MY2(B5:B12,C5:C12)
This formula can be created manually in Excel with the exponentiation operator (^) like this:
=SUM((range1^2)-(range2^2))
With the example as shown, the formula below will return the same result as SUMX2MY2:
=SUM((B5:B12^2)+(C5:C12^2)) // returns -144