I am trying to do a averageifs but with stdev. the averageifs works great:

=AVERAGEIFS('All Subject Data'!$J:$J,'All Subject Data'!$B:$B,"N",'All Subject Data'!$C:$C,6,'All Subject Data'!$D:$D,4.3,'All Subject Data'!$E:$E,1000)
but the stdev version I am trying is giving me a number but it is not correct. When I do a hand sort for the qualifiers I get a wildly different result. here is the formula I am using for stdev, is it wrong? any ideas why it would not work?

=STDEV(IF(('All Subject Data'!$C$2:$C$5220=6)*('All Subject Data'!$D$2:$D$5220=4.3)*('All Subject Data'!$E$2:$E$5220=1000)*('All Subject Data'!$B$2:$B$5220="Male"),'All Subject Data'!$J$2:$J$5220))