ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   performing conditional averages. (https://www.excelbanter.com/excel-worksheet-functions/125631-performing-conditional-averages.html)

vinnie123

performing conditional averages.
 
Hi,

I've got a sheet with about 1500 rows and 30 columns. The data in one
column I've named Gender and in another EthnicGroup. with text
strings in the cell. In a third column with data named Age is a whole
number. (via the define name function)

{=AVERAGE(IF(Gender="Male",Age))} will give me the average age for
males and {=AVERAGE(IF(EthnicGroup="Russian",Age))} will give me the
average age for Russians.

I want to calculate the average age of Russians who are male. I can't
get IF(and(etc to do it. any suggestions.?

Thanks.


T. Valko

performing conditional averages.
 
Try this (array entered):

=AVERAGE(IF((Gender="Male")*(EthnicGroup="Russian" ),Age))

Biff

"vinnie123" wrote in message
ps.com...
Hi,

I've got a sheet with about 1500 rows and 30 columns. The data in one
column I've named Gender and in another EthnicGroup. with text
strings in the cell. In a third column with data named Age is a whole
number. (via the define name function)

{=AVERAGE(IF(Gender="Male",Age))} will give me the average age for
males and {=AVERAGE(IF(EthnicGroup="Russian",Age))} will give me the
average age for Russians.

I want to calculate the average age of Russians who are male. I can't
get IF(and(etc to do it. any suggestions.?

Thanks.





All times are GMT +1. The time now is 08:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com