calculation a average dependated of values in seperate column

  • Thread starter Thread starter vinnie123
  • Start date Start date
V

vinnie123

Hi everyone. I've a spreadsheet with one column (eg. A1:a100)
containing a range of values (ages) and another column (B1:100) a value
of either 1 or 2 (representing males vs females).

How can a find the average of the cells A1:A100 that have a value of 1
in column B; ie. the average age of the males only.

Thanks
 
=AVERAGE(IF(B1:B100=1,A1:A100))

entered with ctrl + shift & enter, if there can be blanks in A

=AVERAGE(IF((A1:A100<>"")*(B1:B100=1),A1:A100))

--
Regards,

Peo Sjoblom

Northwest Excel Solutions

Portland, Oregon
 

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

Back
Top