simple average question

C

CNeils

I have two columns of data. One column has the gender and the column
alongside has the age of these people. The columns are mixed with males and
female. How do I determine the average age of just the men and just the women?

example:

M 66
F 48
M 20
M 46
F 17

I add to this column week by week so it's not like I can just add everything
up at the end tally the data. Is there a function that I can insert into
another cell that I can label "average age of men" and pull the average age
from the column of information just for the average age of men?
 
J

Jim Thomlinson

Something like this should do...

=SUMIF(A2:A7, "=M", B2:B7)/COUNTIF(A2:A7, "=M")
 
G

Gary''s Student

Try the array formula:

=AVERAGE(IF(A1:A1000="M",B1:B1000))

entered with CNTRL-SHFT-ENTER rathr than just the ENTER key.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top