calculate the stdev of an array using text as the criteria

C

Crypes

I'm trying to calculate the stdev of a tester's results and compare it with
other testers.
B4:B15 has the testers' names
C$4:C15 has the test results that I want to calculate the Stdev for.

If I put in =Sum(IF(B$4:B15="DM",C$4:C15,0)), I get the right sum
If I put in =STDEV(IF(B$4:B15="DM",C$4:C15,0)), I get a number that is
definitely not the Stdev

I am trying to avoid having to go and individually select each test result
for each tester because the cells will have to be updated each time a tester
enters a value.

If you could help, that would be great.

Thanks.
 
M

Mike H

Hi,

Your formula was nearly correct try this array entered

=STDEV(IF(B$4:B15="DM",C$4:C15))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike
 
M

Mike H

I should have explained that the reason your formula didn't work was because
you gave it a false option for when the column b didn't = "DM" and it was
using that zero option in the STDEV calculation when DM = FALSE

leaving out the FALSE option makes it evaluate nothing when DM =FALSE

Mike
 
S

Shane Devenshire

Hi,

In other words you should change your formula to:

=STDEV(IF(B$4:B15="DM",C$4:C15,""))
or
=STDEV(IF(B$4:B15="DM",C$4:C15))

because

=STDEV(IF(B$4:B15="DM",C$4:C15,))
or
=STDEV(IF(B$4:B15="DM",C$4:C15,0))

will return incorrect results.

All of these are Array entered - Ctrl+Shift+Enter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top