# Count Number of times Column A says "X" where Column B says "Y"

1. ## Count Number of times Column A says "X" where Column B says "Y"

I'm just wondering how a formula would work where I am wanting Column A says "X" where the same rows in Column B says "Y"?

This is for 500 datasets and I require the answer to be displayed in another column, which appears on a different worksheet, not sure if this affects the formula much.

Thanks  Register To Reply

2. ## Re: Count Number of times Column A says "X" where Column B says "Y"

=countifs(a1:a500,"=x",b1:b50,"=y") should do it
mind you just
=countifs(a1:a500,"x",b1:b50,"y") should work  Register To Reply

3. ## Re: Count Number of times Column A says "X" where Column B says "Y"

Deleted post.  Register To Reply

4. ## Re: Count Number of times Column A says "X" where Column B says "Y"

Hello,

My first attempt would be trying to do a COUNTIF formula combining those two variables.
If that first attempt would fail, do 2 separate countif's and add them in one unic formula using the "+"(add) between them. Such as:

COUNTIF(A:A;"X") + COUNTIF(B:B;"Y")

If you're not sucessfull provide a file so I can have a look.

EDIT: I was too late Kind Regards,
FCarv  Register To Reply

5. ## Re: Count Number of times Column A says "X" where Column B says "Y"

Try

=sumproduct(--(a:a="x")*--(b:b="y"))  Register To Reply

6. ## Re: Count Number of times Column A says "X" where Column B says "Y"

Thanks all for the quick replies.

Countifs worked perfect.  Register To Reply