Conditional statements

wc115

New Member
Joined
Jan 21, 2014
Messages
1
Hi,

I want to find the standard deviation on a certain set of data with conditional statements.
For example I want to find the standard deviation of Sales only if the Rank = A and Month = 1.

RankSALESMONTHS
A11.00
A101.00
A21.00
A101.00
A11.00
B31.00
B32.00
B31.00
B32.00
B31.00
B32.00
B31.00

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>


This is what I came up with:
=STDEV(IF(AND(A2:A6=H2,C2=1),B2:B6))

It works if I only take the first 5, as soon as I take the rest my result changes but it should not because of the conditions.

Any help would be appreciated.

Thanks!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try this one.

=STDEV(IF($A$2:$A$13="A",IF($C$2:$C$13=1,$B$2:$B$13)))

Confirm with Ctrl+Shift+Enter and not just Enter.
 
Upvote 0
Try.
This is an array function and must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDEFGHI
1RankSALESMONTHSStDev.
2A114.764452A
3A101
4A21
5A101
6A11
7B31
8B32
9B31
10B32
11B31
12B32
13B31
14
Sheet
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,334
Members
449,077
Latest member
Jocksteriom

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