#1   Report Post  
Rob Steed
 
Posts: n/a
Default Count values ...

Hi,

Column A contains a list of dates in the format dd/mm/yy. In column B
each date is allocated a value of either Y or N.

What I would like to do is calculate the number of times Y and N
appears for any given month.

Any ideas hwo to implement this please?

Many thanks,

Rob.

  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

=SUMPRODUCT(--(MONTH(A1:A5)=4),--(B1:B5="y"))


"Rob Steed" wrote:

Hi,

Column A contains a list of dates in the format dd/mm/yy. In column B
each date is allocated a value of either Y or N.

What I would like to do is calculate the number of times Y and N
appears for any given month.

Any ideas hwo to implement this please?

Many thanks,

Rob.


  #3   Report Post  
CLR
 
Posts: n/a
Default

Assuming your dates are in column A and your Y/N are in column B,
In C1 put this formula and copy down.....
=MONTH(A1)&B1

In D1 type the number of the month you wish to test.
In E1 type the Y or N you wish to test

In F1 put this formula........it will result the count of the conbination of
the MONTH in D1 and the Y/N in E1
=COUNTIF(C:C,D1&E1)

Change D1 and or E1 at will to check other conditions.

Vaya con Dios,
Chuck, CABGx3



"Duke Carey" wrote in message
...
=SUMPRODUCT(--(MONTH(A1:A5)=4),--(B1:B5="y"))


"Rob Steed" wrote:

Hi,

Column A contains a list of dates in the format dd/mm/yy. In column B
each date is allocated a value of either Y or N.

What I would like to do is calculate the number of times Y and N
appears for any given month.

Any ideas hwo to implement this please?

Many thanks,

Rob.




  #4   Report Post  
Rob Steed
 
Posts: n/a
Default

Thanks for the reply. I have this working but how can I distinguish
between years? The month function for Jan 05 would be the same for Jan
06 i.e 1.

Thanks,

Rob.

  #5   Report Post  
CLR
 
Posts: n/a
Default

I don't know if you're talking to Duke or me, but if me,
then in C1 put =MONTH(A1)&"-"&YEAR(A1)&B1

and in D1 put 1-2005, or whatever month/year combo you want and format D1
for TEXT or use a leading apostrophe.

Vaya con Dios,
Chuck, CABGx3


"Rob Steed" wrote in message
oups.com...
Thanks for the reply. I have this working but how can I distinguish
between years? The month function for Jan 05 would be the same for Jan
06 i.e 1.

Thanks,

Rob.





  #6   Report Post  
Duke Carey
 
Posts: n/a
Default

Perhaps a pivot table would be far better for this, as it allows you to group
by monthly periods.

Select any cell in the table (make sure you have a column header for each),
then use DataPivot table. Click on the finish button and Excel creates a
Pivot table shell.

Drag the header for the Y/N values into the Row area and into the data area,
and the date header into the column area. Right click on the date header,
choose Group & Show DetailGroup, the choose month and choose year.




You'd end up

"Rob Steed" wrote:

Thanks for the reply. I have this working but how can I distinguish
between years? The month function for Jan 05 would be the same for Jan
06 i.e 1.

Thanks,

Rob.


  #7   Report Post  
Duke Carey
 
Posts: n/a
Default

If you were asking how to modify the formula I suggested to incorporate year,
it'd be

=SUMPRODUCT(--(MONTH(A1:A5)=4),--(YEAR(A1:A5)=2004),--(B1:B5="y"))



"Rob Steed" wrote:

Thanks for the reply. I have this working but how can I distinguish
between years? The month function for Jan 05 would be the same for Jan
06 i.e 1.

Thanks,

Rob.


  #8   Report Post  
Rob Steed
 
Posts: n/a
Default

perfect thanx.

Rob.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count how many different text values in an array. OVERLOAD Excel Worksheet Functions 3 April 14th 05 04:12 PM
How do I do count calculations ignoring duplicate values Robin Faulkner Excel Discussion (Misc queries) 1 March 31st 05 03:01 PM
Count occurances of multiple values BaseballFan Excel Worksheet Functions 2 February 17th 05 08:31 AM
formula to count numbers of certain values Ripple919 Excel Worksheet Functions 3 January 12th 05 04:13 PM
Count number of Unique values Alan Excel Worksheet Functions 4 January 6th 05 08:05 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"