=Countif statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two colums. Column A has web site names, column b has country names. I want to use a countif statement that will have double restrictions. I want to be able to say count if A is equal to www.net.com AND column B is equal to "Germany".

I've been using something like this

=COUNTIF($A$2:$A$58,D185)

Where D would be the site name, but now I want to add a second restricition. Does that make sesne?

A B
www.net.com Germany
www.net.com Holland
www.you.com Germany
www.me.com France
 
=SUMPRODUCT(--($A$2:$A$58=D185),--($B$2:$B$58=E185))

where E185 is the second restriction (i.e. Germany in your example)and
B2:B58 is the range with countries

--
No private emails please, for everyone's
benefit keep the discussion in the newsgroup.


Regards,

Peo Sjoblom


Matt in AZ said:
I have two colums. Column A has web site names, column b has country
names. I want to use a countif statement that will have double
restrictions. I want to be able to say count if A is equal to www.net.com
AND column B is equal to "Germany".
I've been using something like this

=COUNTIF($A$2:$A$58,D185)

Where D would be the site name, but now I want to add a second
restricition. Does that make sesne?
 
use sumproduct

=sumproduct((a1:a10="www.net.com")*(b1:b10="Germany))

for a count of www.net.com in germany.



Matt in AZ said:
I have two colums. Column A has web site names, column b has country
names. I want to use a countif statement that will have double
restrictions. I want to be able to say count if A is equal to www.net.com
AND column B is equal to "Germany".
I've been using something like this

=COUNTIF($A$2:$A$58,D185)

Where D would be the site name, but now I want to add a second
restricition. Does that make sesne?
 
Back
Top