vendredi 25 août 2017

(Nested) IF statement to calculate MEAN in Excel

I have collected values for several test persons and for different tasks, and I want to calculate the MEAN and STDEV for each of the test persons for each task. This is what my table looks like: enter image description here

I want to calculate the MEAN and STDEV for each person and each task, and I want to do this with one formula and (as it is possible) no "help columns" or by filtering manually. On a different sheet (called "analysis") I have another table to show me the summarized data. It looks like this: enter image description here

In the highlighted cell, I want to add the summarized MEAN (and there's a similar table for STDEV). So far, I tried:

=MEAN(IF(analysis!B1=values!$A$2:$A$13,IF(analysis!A2=values!$B$2:$B$13,values!$C$2:$C$13)))

... and many other variants of this, like switching the positions and so on. I also tried COUNTIF in the IF loop (that's a solution I found for somehow similar problems, but then I didn't find a way to tell Excel to just calculate the values where the test person and task was actually correct.

I guess it's because the IF statement doesn't work with an array, but this is just a guess. I searched for similar questions in different portals, but the main problem was that I really need Excel to return the correct values in order to calculate the mean - just returning TRUE or FALSE won't work (or at least I don't know how). I would appreciate every advice or solution you have!

Aucun commentaire:

Enregistrer un commentaire