Subtracting the Average with Array Formulas

IlanK

New Member
Joined
Aug 27, 2012
Messages
6
Hello Excel friends!

Here's my issue.

I have two rows:

ABCD
11212
25430

<tbody>
</tbody>


With a single formula, it's easy to take A1, subtract the average of A1 and A2, and then square that value. The complexity is that I would like to use a single cell/formula to take the sum of those values for all four columns. I do not want to simply write the formula multiple times with +'s in between since there are (in reality) quite a lot of columns.

Any thoughts?

Thanks,

Ilan
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I'm not entirely sure what you're asking.

This?


Excel 2010
ABCDEFG
1121201.5
2543003.0
3
4-0.50.5-0.50.50
5210-30
Sheet1
Cell Formulas
RangeFormula
E1=SUMPRODUCT(A1:D1-AVERAGE(A1:D1))
E4=SUM(A4:D4)
A4=A1-$G1
A5=A2-$G2


Column G and Rows 4 & 5 are for validation purposes.
 
Upvote 0
Here is what I am trying to do:

1212Row 1
5430Row 2
3321Average
1.330.330.501.00
(Row 1 - Average)^2/average
3.166667Value I want

<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
This might work???


Excel 2010
ABCD
11212
25430
3
43.166667
Sheet1
Cell Formulas
RangeFormula
D4=SUMPRODUCT((A1:D1-((A1:D1+A2:D2)/2))^2/((A1:D1+A2:D2)/2))


Not 100% confident though.
 
Upvote 0
This might work???

Excel 2010
ABCD
11212
25430
3
43.166667

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
D4=SUMPRODUCT((A1:D1-((A1:D1+A2:D2)/2))^2/((A1:D1+A2:D2)/2))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Not 100% confident though.

Hmm... I'm confused. Doesn't the sumproduct formula require two arrays?
 
Upvote 0
Hmm... I'm confused. Doesn't the sumproduct formula require two arrays?

I'm probably not the best person to answer this but the formula contains multiple arrays.

The main two being:

(A1:D1-((A1:D1+A2:D2)/2))^2

and

((A1:D1+A2:D2)/2)

But there are arrays within these, for example A1:D1+A2:D2.
 
Upvote 0
I'm probably not the best person to answer this but the formula contains multiple arrays.

The main two being:

(A1:D1-((A1:D1+A2:D2)/2))^2

and

((A1:D1+A2:D2)/2)

But there are arrays within these, for example A1:D1+A2:D2.

Unfortunately this formula does not work as the sumproduct formula must be in the format =sumproduct(array 1 [comma] array 2).
 
Upvote 0
Unfortunately this formula does not work as the sumproduct formula must be in the format =sumproduct(array 1 [comma] array 2).

It doesn't have to be and you are referring to my example.

See Post 4 for the answer.
 
Upvote 0

Forum statistics

Threads
1,216,193
Messages
6,129,447
Members
449,509
Latest member
ajbooisen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top