Calculate Stdev with Array-formula

SIGE

Board Regular
Joined
Oct 6, 2010
Messages
88
Hi there,

I would like to calculate the Stdev from a range (B1:B10) when a condition on another range (A1:A10) is met.

I am trying to wing it with below formula but the output is not what it should be ...
{=STDEV((A1:A10<=25)*B1:B10)}


Anybody an idea?
Thanks in advance,
Sige
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Try

=STDEV(IF(A1:A10<=25, B1:B10))

... confirmed with CSE.
 
Upvote 0
I am trying a double condition :
{=STDEV(IF(AND(Qty>$E$2;Qty<$E$4);ANS))}

But it turns a Div/0! error, while it shoudn't.

Any suggestion to calculate the Stdev with a double condition?

Thanks in advance, Sige
 
Upvote 0
Have you watched the formula evaluate to see what's happening?

Is E4>E2?
 
Upvote 0
Hi Shg,

Yes the evaluation of the AND turns a single FALSE , no range.

But I've found what it needs to do:

{ =STDEV(IF(Qty>$E$2;IF(Qty<$E$4;ANS))) }

Woot, Sige
 
Upvote 0
Right, because AND and OR always evaluate ALL of their arguments in one fell swoop.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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