ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNT dates in ColumnY based on numbers in ColumnX (https://www.excelbanter.com/excel-worksheet-functions/122273-count-dates-columny-based-numbers-columnx.html)

M.Moncrief

COUNT dates in ColumnY based on numbers in ColumnX
 
I need to count the number of dates in column Y based on whether or not a
number is entered in column X. I've tried several varieties of the COUNT
functions and keep getting errors.

Here is scenario: if columnX contains "1" in any of the cells, I need the
function to count the number of dates in columnY that correspond to those
cells from columnX with the number 1.

Thanks,
M.Moncrief

T. Valko

COUNT dates in ColumnY based on numbers in ColumnX
 
For the specific number of 1 in column X:

=SUMPRODUCT(--(X1:X10=1),--(ISNUMBER(Y1:Y10)))

For *ANY* number in column X:

=SUMPRODUCT(--(ISNUMBER(X1:X10)),--(ISNUMBER(Y1:Y10)))

Biff

"M.Moncrief" wrote in message
...
I need to count the number of dates in column Y based on whether or not a
number is entered in column X. I've tried several varieties of the COUNT
functions and keep getting errors.

Here is scenario: if columnX contains "1" in any of the cells, I need the
function to count the number of dates in columnY that correspond to those
cells from columnX with the number 1.

Thanks,
M.Moncrief




Dave F

COUNT dates in ColumnY based on numbers in ColumnX
 
You'll need to use SUMPRODUCT, not COUNT, COUNTIF, or COUNTA for that task.

The COUNT functions work only on one set of criterias, not multiple sets
(same with SUMIF...)

Dave
--
Brevity is the soul of wit.


"M.Moncrief" wrote:

I need to count the number of dates in column Y based on whether or not a
number is entered in column X. I've tried several varieties of the COUNT
functions and keep getting errors.

Here is scenario: if columnX contains "1" in any of the cells, I need the
function to count the number of dates in columnY that correspond to those
cells from columnX with the number 1.

Thanks,
M.Moncrief


M.Moncrief

COUNT dates in ColumnY based on numbers in ColumnX
 
Perfect solution ~ thanks so very much. This was my first time to use the
discussion posts and I'm definitely hooked on looking here first when I have
a problem.

Again, much appreciated.

"T. Valko" wrote:

For the specific number of 1 in column X:

=SUMPRODUCT(--(X1:X10=1),--(ISNUMBER(Y1:Y10)))

For *ANY* number in column X:

=SUMPRODUCT(--(ISNUMBER(X1:X10)),--(ISNUMBER(Y1:Y10)))

Biff

"M.Moncrief" wrote in message
...
I need to count the number of dates in column Y based on whether or not a
number is entered in column X. I've tried several varieties of the COUNT
functions and keep getting errors.

Here is scenario: if columnX contains "1" in any of the cells, I need the
function to count the number of dates in columnY that correspond to those
cells from columnX with the number 1.

Thanks,
M.Moncrief





T. Valko

COUNT dates in ColumnY based on numbers in ColumnX
 
You're welcome. Thanks for the feedback!

Biff

"M.Moncrief" wrote in message
...
Perfect solution ~ thanks so very much. This was my first time to use the
discussion posts and I'm definitely hooked on looking here first when I
have
a problem.

Again, much appreciated.

"T. Valko" wrote:

For the specific number of 1 in column X:

=SUMPRODUCT(--(X1:X10=1),--(ISNUMBER(Y1:Y10)))

For *ANY* number in column X:

=SUMPRODUCT(--(ISNUMBER(X1:X10)),--(ISNUMBER(Y1:Y10)))

Biff

"M.Moncrief" wrote in message
...
I need to count the number of dates in column Y based on whether or not
a
number is entered in column X. I've tried several varieties of the
COUNT
functions and keep getting errors.

Here is scenario: if columnX contains "1" in any of the cells, I need
the
function to count the number of dates in columnY that correspond to
those
cells from columnX with the number 1.

Thanks,
M.Moncrief








All times are GMT +1. The time now is 06:50 AM.

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