ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting two columns with specific criteria (https://www.excelbanter.com/excel-worksheet-functions/220806-counting-two-columns-specific-criteria.html)

rjre

Counting two columns with specific criteria
 
In column A I have a list of FIRST names and in column B I have a list
of LAST names.

How can I count the number of people with "SMITH" as the LAST name
ONLY if they have "BOB" as a FIRST name?

I have a tried a few things but have got a bit of brain freeze...

Any suggestions?

Thanks

Richard

Mike H

Counting two columns with specific criteria
 
Hi,

Try this

=SUMPRODUCT((A1:A20="Bob")*(B1:B20="Smith"))

Mike

"rjre" wrote:

In column A I have a list of FIRST names and in column B I have a list
of LAST names.

How can I count the number of people with "SMITH" as the LAST name
ONLY if they have "BOB" as a FIRST name?

I have a tried a few things but have got a bit of brain freeze...

Any suggestions?

Thanks

Richard


rjre

Counting two columns with specific criteria
 
THANKS!

i had no idea i that function worked on text! FANTASTIC!



On Feb 13, 11:09*am, Mike H wrote:
Hi,

Try this

=SUMPRODUCT((A1:A20="Bob")*(B1:B20="Smith"))

Mike



"rjre" wrote:
In column A I have a list of FIRST names and in column B I have a list
of LAST names.


How can I count the number of people with "SMITH" as the LAST name
ONLY if they have "BOB" as a FIRST name?


I have a tried a few things but have got a bit of brain freeze...


Any suggestions?


Thanks


Richard- Hide quoted text -


- Show quoted text -



Mike H

Counting two columns with specific criteria
 
Glad I could help

"rjre" wrote:

THANKS!

i had no idea i that function worked on text! FANTASTIC!



On Feb 13, 11:09 am, Mike H wrote:
Hi,

Try this

=SUMPRODUCT((A1:A20="Bob")*(B1:B20="Smith"))

Mike



"rjre" wrote:
In column A I have a list of FIRST names and in column B I have a list
of LAST names.


How can I count the number of people with "SMITH" as the LAST name
ONLY if they have "BOB" as a FIRST name?


I have a tried a few things but have got a bit of brain freeze...


Any suggestions?


Thanks


Richard- Hide quoted text -


- Show quoted text -





All times are GMT +1. The time now is 05:24 PM.

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