Math & Trig All versions ◉ 45 views

=SUMXMY2()

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

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=SUMXMY2(array_x, array_y)
Hover argument names in the table for details.
Output typeNumber
Popularity22 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =SUMXMY2() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download SUMXMY2.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
array_x Range/Array Required The first array or range of values.
array_y Range/Array Required The second array or range of values.

▣ Examples

▦ Data
CellValue
A2 First array
B2 Second array
A3 2
B3 6
A4 3
B4 5
A5 9
B5 11
A6 1
B6 7
A7 8
B7 5
A8 7
B8 4
A9 5
B9 4
A10 First array
B10 Second array
A11 2
B11 6
A12 3
B12 5
A13 9
B13 11
A14 1
B14 7
A15 8
B15 5
A16 7
B16 4
A17 5
B17 4
Sum of squares of differences of the two arrays above (79) =SUMXMY2(A3:A9,B3:B9)
Result: 79
Sum of squares of differences of the two arrays constants (79) =SUMXMY2({2, 3, 9, 1, 8, 7, 5}, {6, 5, 11, 7, 5, 4, 4})
Result: 79

§ Remarks

  • The arguments should be either > numbers or > names, arrays, or references that contain numbers
  • If an array or 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 do not have the same number of values, SUMXMY2 returns the #N/A error value.
  • The equation for the sum of squared differences is:

✦ Tips

  • The arguments should be either > numbers or > names, arrays, or references that contain numbers
  • If an array or reference argument contains text, logical values, or empty cells, those values are ignored. However, cells with the value zero are included.
  • The equation for the sum of squared differences is:

⚠ Common Errors

#N/A If array_x and array_y do not have the same number of values, SUMXMY2 returns the #N/A error value.
Fix: Use equal sizes

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.