Standard deviation using IF and OR function for multiple conditions

1. Standard deviation using IF and OR function for multiple conditions

Dear ex(cel)perts,

I have run into a problem analyzing some data from a questionnaire.

I would like to calculate the standard deviation for one variable - their weight, but they have to meet either of two conditions.
Or said in another way: In the questionnaire they have 3 options, but I only want to calculate the standard deviation of their weight if they have chosen option 1 or option 2, not option 3.

I have tried using the following formulas, but they did not work (even with ctrl+alt+enter):
=STDEV.P(IF(OR(Question Datarange="Option1",Question Datarange="Option2"),Weight Datarange))
=STDEV.P(IF(Question Datarange="Option1",Weight Datarange),IF(Question Datarange="Option2",Weight Datarange))

Anyone who can help me out here?

Best Regards
Knut

2. Re: Standard deviation using IF and OR function for multiple conditions

=STDEV.P(IF(A2:A10="option1",C2:C10,IF(A2:A10="option2",C2:C10,""))) as an array. Hopefully you can change the ranges for your data. a2:a10=question data range

I think =STDEV.P(IF(A2:A10="option1",C2:C10,IF(A2:A10="option2",C2:C10))) will also work, but prefer to get rid of the FALSE values in the array

a2:a10 = question daterange
c2:c10 = weight daterange

or =STDEV.P(IF(A2:A10<>A10,"option 3" C2:C10,""))

All entered as an array

3. Re: Standard deviation using IF and OR function for multiple conditions

Wow, quick response and it worked! Thank you very much.

I am very grateful!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1