Dear everyone,

I'm a medical student working with test subject files. In order to evaluate wether a certain intervention has an effect or not, I need to evaluate the differences between two groups. I made an excel file with data of every test subject in one tab. At the top of the page, I displayed the group to which the test subject belongs. Now I want to make a summary of all data in a new tab. I want to calculate the standard deviation over previous tabs, with the condition to only calculate the value if the test subject belongs to group 0 or group 1. My formula now is =STDEV(IF('testsubject01'!A1=0;'testsubject01'!B1);IF('testsubject02'!A1=0;'testsubject02'!B1;etc.). In this formula A1 is the groupnumer and B1 is a random data. The problem is the groupnumber. When the groupnumber is 0, the data is used for the calculation of the standard deviation, which is correct. However, when the groupnumer is 1, the data isn't used for the calculation, but this test subject does count for one in the population (he or she adds up in the population (N) of the formula). How could I solve this problem?