Conditional COUNTIF Function

G

Guest

Hi, I have two columns with different values in and I would like to count the
number of times certain values appear in the same row.

i.e. Column A contains random numbers from 1-10
Column B contains random letters between A-Z

How could I count the number of times the number "1" is in the same row as
letter "A"??

Struggling at the moment with this so any help would be appreciated.

Thanks
 
D

Domenic

Try...

=SUMPRODUCT(--(A2:A100=1),--(B2:B100="A"))

Adjust the range accordingly.

Hope this helps!
 
G

Guest

Got this from others much smarter than me. Let's say your random numbers are
in the range A1 to A100 and range B1 to B100 contains your letters. To
determine the number of occurrences of rows with the number 1 with the number
A, do this:

=SUMPRODUCT(--(A1:A100=1),--(B1:B100="A"))

You could set up two cells to hold the numerical and alphabetical values so
that you don't have to continually modify this formula to see the results of
different combinations. For example, put a number in C1 and a letter in D1
and modify the above formula to:

=SUMPRODUCT(--(A1:A100=C1),--(B1:B100=D1))
 
B

Bruno Campanini

Blair said:
Hi, I have two columns with different values in and I would like to count
the
number of times certain values appear in the same row.

i.e. Column A contains random numbers from 1-10
Column B contains random letters between A-Z

How could I count the number of times the number "1" is in the same row as
letter "A"??

Struggling at the moment with this so any help would be appreciated.

The shortest formula:
=SUMPRODUCT((A1:A10=5)*(B1:B10="B"))

Bruno
 

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

Similar Threads


Top