Forum Discussion
Mean on excel
- Mar 21, 2022
Let's say that your values are in D2:D100.
You should have (or create) another column that specifies which group the values belong to. For example in G2:G100 you could have 1 if the cell in column D belongs to one group, and 2 if it belongs to the other group. Of course, you can use other indicators, such as Y and N, or M and F, etc.
The mean of the first group is returned by
=AVERAGEIF(G2:G100, 1, D2:D100)
or
=AVERAGEIF(G2:G100, "Y", D2:D100)
etc., and that of the other group by
=AVERAGEIF(G2:G100, 2, D2:D100)
etc.
Let's say that your values are in D2:D100.
You should have (or create) another column that specifies which group the values belong to. For example in G2:G100 you could have 1 if the cell in column D belongs to one group, and 2 if it belongs to the other group. Of course, you can use other indicators, such as Y and N, or M and F, etc.
The mean of the first group is returned by
=AVERAGEIF(G2:G100, 1, D2:D100)
or
=AVERAGEIF(G2:G100, "Y", D2:D100)
etc., and that of the other group by
=AVERAGEIF(G2:G100, 2, D2:D100)
etc.