ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If, then (https://www.excelbanter.com/excel-worksheet-functions/237758-if-then.html)

Joseph[_5_]

If, then
 
I am trying to write a formula that will look at a column to see if
there are any corresponding values, if there are, look at another
column and count. For example:

intercept gender
1 Male
1 Female
2 Male
1 Male
2 Female

So, I want to look at the intercept column and match records that
equal 1 and then count those corresponding records in the gender
column by males and females. Please let me know if I need to
elaborate.

Kindest regards,
Joseph

Lars-Åke Aspelin[_2_]

If, then
 
On Wed, 22 Jul 2009 13:56:02 -0700 (PDT), Joseph
wrote:

I am trying to write a formula that will look at a column to see if
there are any corresponding values, if there are, look at another
column and count. For example:

intercept gender
1 Male
1 Female
2 Male
1 Male
2 Female

So, I want to look at the intercept column and match records that
equal 1 and then count those corresponding records in the gender
column by males and females. Please let me know if I need to
elaborate.

Kindest regards,
Joseph



Try this formala for the number of Male with intercept 1:

=SUMPRODUCT((A1:A5=1)*(B1:B5="Male"))

Hope this helps / Lars-Åke


All times are GMT +1. The time now is 06:05 AM.

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