Conditional Standard Deviation

bp32

New Member
Joined
Mar 6, 2009
Messages
49
Hey Everyone,

I would like to calculate standard deviations for data in column B, but only if the value in column A is equal to a particular value. For sake of argument, let's say I want the STDV calculated for all values in column B where column A = "ABC" (column A here being "general" or "text").

Any ideas how to structure the formula?

Many thanks.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Thanks, Barry.

I tried it a few times and keep getting an error.

Here's what I used: =STDEV(IF(E2:E1227="NYY",P2:P1227)). I also am hitting CTRL+SHFT+ENTER.

Could it be that I need to change the format of the text in column E?
 
Upvote 0
That formula looks fine. Are you using CSE correctly?

If you have the formula in a specific cell then select that cell and then press F2 to select the formula. Now hold down CTRL and SHIFT keys and press ENTER - if done correctly then you'll get curly braces like { and } around the formula in the formula bar.

If that doesn't work....what error are you getting?
 
Upvote 0
It's telling me it is a divide by zero error.

I altered the formula, since there were 11 rows where the value was 0. Here's the new formula:

{=STDEV(IF(E12:E1227="NYY",P12:P1227))}

I think the problem is with the IF function. I tried using a cell as reference and I get the same error. I tried converting the names to numbers, and that seems to do the trick.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,761
Members
452,940
Latest member
rootytrip

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