Standard Deviation if formula

mayoman51

New Member
Joined
Aug 13, 2016
Messages
6
Hi,

I'm trying to compare the standard deviations 2 different data sets A & B over a period of time. The sets of data do not begin at the same time however, so I'm looking for a formula that will exclude data from the standard deviation calculation of B where there is a blank value for the data at the corresponding time in A.
IS there an IF function that can do this?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I tried to adapt the formula to work =STDEV(IF('Sheet 1'!$B$3:$B$2611="<>",'Sheet 2'!$B$4:$B$2612))
I'm getting a #DIV/0! error, I've tried different values instead of the "<>" but they all give the same error
 
Upvote 0
This?


Excel 2010
ABCDE
1
22
328
492
52222
641
754
85456
93319.62396
1073
111919.62396
Sheet18
Cell Formulas
RangeFormula
E11=STDEV(A2,A4,A5,A7,A8,A10)
E9{=STDEV(IF($A$2:$A$10<>$C$3:$C$11,$A$2:$A$10))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
No I tried this formula, i'll try the above now


Excel 2010
ABCD
1NameNumber
2A1
3B5
4C7
5A2
6E3
7F8
8G9
9A6
10
11
122.645751
13
142.645751

<colgroup><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet4

Worksheet Formulas
CellFormula
D14=STDEV(B2,B5,B9)

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

<tbody>
</tbody>

Array Formulas
CellFormula
D12{=STDEV(IF($A$2:$A$9=A9,$B$2:$B$9))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself


<tbody>
</tbody>
 
Upvote 0
Data AData B
1
1
1.5
0.25
10.5
1.252
0.5-0.5
-.5-1
-1-.5
0.251.51.21106

<tbody>
</tbody>


I still can't get it to work. Maybe im not entering it properly.
In the example above, for column B, I only want to include values in the standard deviation calculation when there is a corresponding value in column A. So in this example the first 4 rows would be excluded from the standard deviation calculations, resulting in a stdev of 1.21106 for the remaining 6 entries
 
Upvote 0
this gives the same answer as yours


Excel 2012
ABC
11
21
31.5
40.25
510.5
61.252
70.5-0.5
8-0.5-1
9-1-0.5
100.251.51.21106
Sheet5
Cell Formulas
RangeFormula
C10{=STDEV(IF($A$1:$A$10<>"",$B$1:$B$10))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
this gives the same answer as yours

Excel 2012
ABC
11
21
31.5
40.25
510.5
61.252
70.5-0.5
8-0.5-1
9-1-0.5
100.251.51.21106

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

Array Formulas
CellFormula
C10{=STDEV(IF($A$1:$A$10<>"",$B$1:$B$10))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Thank you, this worked
 
Upvote 0

Forum statistics

Threads
1,214,626
Messages
6,120,602
Members
448,974
Latest member
ChristineC

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