1

I am working on a sports analytics tracker in Excel, and for one part I need to count (I know there are other questions that just need to find them) how many appearances there are of a two-cell value in a certain range. So, for example, if I was searching for:

-----------------
|  foo  |  bar  |
-----------------

in:

-----------------
|  foo  |  bar  |
-----------------
|  far  |  foo  |
-----------------
|  far  |  fob  |
-----------------
|  foo  |  bar  |
-----------------
|  boo  |  bar  |
-----------------
|  far  |  foo  |
-----------------
|  foo  |  bar  |
-----------------

I would like the result to be 3, as the query appears three times. I would like to use a formula for this: I have tried using COUNTIF, and while I was able to count up how many matched in each column, I couldn't see how many matched the two-cell combination.

Any help would be appreciated.

2 Answers 2

1

Consider:

=SUMPRODUCT(--(A:A="foo")*(B:B="bar"))

enter image description here

0
3

This is what COUNTIFS is for:

=COUNTIFS(A:A,"foo",B:B,"bar")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .