How do I count sets of cells in two columns?

D

David

1 2
a 4
b 2
a 4
c 3
b 4

For the above example, I would like a formula that can count how many times
"a" appears in column 1 with "4" in column 2 of the same row. The output for
this example should be 2
 
R

robzrob

1   2
a   4
b   2
a   4
c   3
b   4

For the above example, I would like a formula that can count how many times
"a" appears in column 1 with "4" in column 2 of the same row.  The output for
this example should be 2

In column C: =A1&B1, copy down. Then in any cell, assuming 5 rows:
=COUNTIF(C1:C5,"=a4") - but there's probably a more elegant way!
Watch below...
 

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