Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I think this is a simple question. I have a big table of data points and I want to take a an average of a subset of a single column. For example, if A is "age" and B is "gender," what command could I use to calculate the average age of women in my table?

I know I can do this by sorting the table by column B and then only selecting column A values, but I want to build up to much more complicated conditional terms (e.g. if A is 5 and B is 3 and C is 4, then give me the average of D).


share|improve this question
up vote 0 down vote accepted

You want the inbuilt averageif function.

The sumif and countif functions may also be useful for you.

If you have very large data sets and/or want to do a more complex analysis then pivot tables are useful too.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.