ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula Help (https://www.excelbanter.com/excel-discussion-misc-queries/122178-formula-help.html)

Pete

Formula Help
 
I am trying to count the number of cells that contain a Y in a particular
column IF the data in another column IS a date. I have tried a variation of
the COUNTIF formula together with the AND function but it doesn't appear to
like me using them together. Any ideas much appreciated.

The date column is A cells 2:1528 and the Y or N appears in the X column
also from cells 2:1528.

please help!

thanks

Pete

Don Guillett

Formula Help
 
something like this. Untested

=sumproduct((isdate(a2:a22))*(b2:b22="Y"))

--
Don Guillett
SalesAid Software

"Pete" <Pete @discussions.microsoft.com wrote in message
...
I am trying to count the number of cells that contain a Y in a particular
column IF the data in another column IS a date. I have tried a variation
of
the COUNTIF formula together with the AND function but it doesn't appear
to
like me using them together. Any ideas much appreciated.

The date column is A cells 2:1528 and the Y or N appears in the X column
also from cells 2:1528.

please help!

thanks

Pete




Eric

Formula Help
 
Pete --

If you don't mind tying up another column -- You could just put an IF
statement in a column and combine it with an AND statement. If both are
true, have the cell output a "1" and then sum these on the bottom.

Eric

"Pete" wrote:

I am trying to count the number of cells that contain a Y in a particular
column IF the data in another column IS a date. I have tried a variation of
the COUNTIF formula together with the AND function but it doesn't appear to
like me using them together. Any ideas much appreciated.

The date column is A cells 2:1528 and the Y or N appears in the X column
also from cells 2:1528.

please help!

thanks

Pete


Don Guillett

Formula Help
 
=SUMPRODUCT((ISNONTEXT(B2:B22))*(D2:D22="d"))

--
Don Guillett
SalesAid Software

"Pete" <Pete @discussions.microsoft.com wrote in message
...
I am trying to count the number of cells that contain a Y in a particular
column IF the data in another column IS a date. I have tried a variation
of
the COUNTIF formula together with the AND function but it doesn't appear
to
like me using them together. Any ideas much appreciated.

The date column is A cells 2:1528 and the Y or N appears in the X column
also from cells 2:1528.

please help!

thanks

Pete





All times are GMT +1. The time now is 07:34 PM.

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