ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   combined two countif functions (https://www.excelbanter.com/excel-discussion-misc-queries/40027-combined-two-countif-functions.html)

Geoff

combined two countif functions
 
I want to have a table as such:

state population

CO 100
NE 200
CO 300

I want to count the number of times state is CO and Population is
200. In the example it should result in a count of 1.

How do i formulate this?

thanks.


Michael

Hi Geoff
Try this:

=SUMPRODUCT((A1:A3="CO")*(B1:B3200))

HTH
Michael Mitchelson


"Geoff" wrote:

I want to have a table as such:

state population

CO 100
NE 200
CO 300

I want to count the number of times state is CO and Population is
200. In the example it should result in a count of 1.

How do i formulate this?

thanks.



Bob Phillips

=SUMPRODUCT(--(A2:a100="CO"),--(B2:B100200))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Geoff" wrote in message
ps.com...
I want to have a table as such:

state population

CO 100
NE 200
CO 300

I want to count the number of times state is CO and Population is
200. In the example it should result in a count of 1.

How do i formulate this?

thanks.





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

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