ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count data in one column indicated by data in another column (https://www.excelbanter.com/excel-worksheet-functions/139980-count-data-one-column-indicated-data-another-column.html)

Carol

Count data in one column indicated by data in another column
 
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!
--
Carol

Teethless mama

Count data in one column indicated by data in another column
 
=SUMPRODUCT(--(A2:A100=""),--(B2:B100=1))


"Carol" wrote:

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!
--
Carol


T. Valko

Count data in one column indicated by data in another column
 
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

"Carol" wrote in message
...
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!
--
Carol




Carol

Count data in one column indicated by data in another column
 
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.)

??
--
Carol


"Teethless mama" wrote:

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


"Carol" wrote:

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!
--
Carol


Carol

Count data in one column indicated by data in another column
 
It WORKED! Beautiful! I've never seen the "ROWS" thing before.... but love
it!
Thank you so very much!
--
Carol


"T. Valko" wrote:

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

"Carol" wrote in message
...
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!
--
Carol





T. Valko

Count data in one column indicated by data in another column
 
You're welcome. Thanks for the feedback!

Biff

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


"T. Valko" wrote:

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

"Carol" wrote in message
...
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!
--
Carol








All times are GMT +1. The time now is 01:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com