Count appearances of two-adjacent-cell value in range (Excel)
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
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.
microsoft-excel worksheet-function microsoft-excel-2016 countif
New contributor
add a comment |Â
up vote
1
down vote
favorite
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.
microsoft-excel worksheet-function microsoft-excel-2016 countif
New contributor
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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.
microsoft-excel worksheet-function microsoft-excel-2016 countif
New contributor
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.
microsoft-excel worksheet-function microsoft-excel-2016 countif
microsoft-excel worksheet-function microsoft-excel-2016 countif
New contributor
New contributor
New contributor
asked 4 hours ago
Geza Kerecsenyi
153
153
New contributor
New contributor
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Consider:
=SUMPRODUCT(--(A:A="foo")*(B:B="bar"))
Works perfectly - thanks!
â Geza Kerecsenyi
4 hours ago
@GezaKerecsenyi Thanks for the feedback!
â Gary's Student
4 hours ago
add a comment |Â
up vote
1
down vote
This is what COUNTIFS is for:
=COUNTIFS(A:A,"foo",B:B,"bar")
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Consider:
=SUMPRODUCT(--(A:A="foo")*(B:B="bar"))
Works perfectly - thanks!
â Geza Kerecsenyi
4 hours ago
@GezaKerecsenyi Thanks for the feedback!
â Gary's Student
4 hours ago
add a comment |Â
up vote
1
down vote
accepted
Consider:
=SUMPRODUCT(--(A:A="foo")*(B:B="bar"))
Works perfectly - thanks!
â Geza Kerecsenyi
4 hours ago
@GezaKerecsenyi Thanks for the feedback!
â Gary's Student
4 hours ago
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Consider:
=SUMPRODUCT(--(A:A="foo")*(B:B="bar"))
Consider:
=SUMPRODUCT(--(A:A="foo")*(B:B="bar"))
answered 4 hours ago
Gary's Student
13k31629
13k31629
Works perfectly - thanks!
â Geza Kerecsenyi
4 hours ago
@GezaKerecsenyi Thanks for the feedback!
â Gary's Student
4 hours ago
add a comment |Â
Works perfectly - thanks!
â Geza Kerecsenyi
4 hours ago
@GezaKerecsenyi Thanks for the feedback!
â Gary's Student
4 hours ago
Works perfectly - thanks!
â Geza Kerecsenyi
4 hours ago
Works perfectly - thanks!
â Geza Kerecsenyi
4 hours ago
@GezaKerecsenyi Thanks for the feedback!
â Gary's Student
4 hours ago
@GezaKerecsenyi Thanks for the feedback!
â Gary's Student
4 hours ago
add a comment |Â
up vote
1
down vote
This is what COUNTIFS is for:
=COUNTIFS(A:A,"foo",B:B,"bar")
add a comment |Â
up vote
1
down vote
This is what COUNTIFS is for:
=COUNTIFS(A:A,"foo",B:B,"bar")
add a comment |Â
up vote
1
down vote
up vote
1
down vote
This is what COUNTIFS is for:
=COUNTIFS(A:A,"foo",B:B,"bar")
This is what COUNTIFS is for:
=COUNTIFS(A:A,"foo",B:B,"bar")
answered 4 hours ago
Scott Craner
10.1k1814
10.1k1814
add a comment |Â
add a comment |Â
Geza Kerecsenyi is a new contributor. Be nice, and check out our Code of Conduct.
Geza Kerecsenyi is a new contributor. Be nice, and check out our Code of Conduct.
Geza Kerecsenyi is a new contributor. Be nice, and check out our Code of Conduct.
Geza Kerecsenyi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1362476%2fcount-appearances-of-two-adjacent-cell-value-in-range-excel%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password