Count data in one column indicated by data in another column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Column A holds "X" or "" (blank). Column B holds "1", "2", or "3".
I need to count the number of 1s, 2s, and 3s, in column B when the cell in
column A is blank.

I've tried several variations of IF, AND, & COUNTIF - can't get anything to
work. Have also tried many variations of SUMPRODUCT found in other posts.
None are working for me.

Can you please help? Is there a way to do this?
Thank you!
 
Try this:

=SUMPRODUCT(--(A$1:A$10=""),--(B$1:B$10=ROWS($1:1)))

Copy down a total of 3 cells.

The first cell will be the count of 1's. The second cell will be the count
of 2's and the third cell will be the count of 3's.

Biff
 
Hmmm. This gives me a result of "0". The actual result should be "8".
(There are a total of 15 cells in column B with the number 1, while 7 of the
corresponding cells in column A are not blank.)

??
 
It WORKED! Beautiful! I've never seen the "ROWS" thing before.... but love
it!
Thank you so very much!
 
You're welcome. Thanks for the feedback!

Biff

Carol said:
It WORKED! Beautiful! I've never seen the "ROWS" thing before.... but
love
it!
Thank you so very much!
 

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

Back
Top