Help required with COUNTIF (I think!)

P

PaulEvans

I have two columns as follows:


A X
B Y
B X
B Y
A X
A Y
A X
A Y

Using COUNTIF I have found the number of times that B occurs in colum
1 (the answer is 3). Similarly, I have used COUNTIF to find the numbe
of times that Y occurs in column 2 (the answer is 4). What I now wan
to know is the number of times that B occurs in column 1 but only whe
it is matched by Y in column 2 on the same row. The answer should b
2.

Any help would be appreciated
 
K

Ken Wright

=SUMPRODUCT((Range1="B")*(Range2="Y"))

or substitute B & Y for cell addresses that contain B & Y
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top