Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Counting specific dates

Hi, this seems to be a very simple query but obviously too hard for my brain.
I have a column full of dates i.e.22/11/2009, 1/12/2009 etc. I may have
duplicates which isn't a problem. What I want to do is count the number of
rows that say were done in the month of November etc. I use Excel 2003.

Many thanks for any assistance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Counting specific dates

Hi

Try this one:

=COUNTIF(A1:A10,"=01/11/2009")-COUNTIF(A1:A10,"30/11/2009")

Regards,
Per

"gooders" skrev i meddelelsen
...
Hi, this seems to be a very simple query but obviously too hard for my
brain.
I have a column full of dates i.e.22/11/2009, 1/12/2009 etc. I may have
duplicates which isn't a problem. What I want to do is count the number of
rows that say were done in the month of November etc. I use Excel 2003.

Many thanks for any assistance.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Counting specific dates

Try: =SUMPRODUCT(N(MONTH(A1:A40)=11))
where A1:A40 holds the different dates
Micky

"gooders" wrote:

Hi, this seems to be a very simple query but obviously too hard for my brain.
I have a column full of dates i.e.22/11/2009, 1/12/2009 etc. I may have
duplicates which isn't a problem. What I want to do is count the number of
rows that say were done in the month of November etc. I use Excel 2003.

Many thanks for any assistance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Counting specific dates

Sorry further to above I know that I can use the following:

=COUNT(IF(MONTH(A1:A100)=11,1,"")) as an array formula but I want to be able
to differentiate also between years, i.e. November 2009 and November 2010 etc.
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Counting specific dates

=sumproduct(--(text(a1:a100,"yyyymm")="200911"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

gooders wrote:

Sorry further to above I know that I can use the following:

=COUNT(IF(MONTH(A1:A100)=11,1,"")) as an array formula but I want to be able
to differentiate also between years, i.e. November 2009 and November 2010 etc.


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Counting specific dates

Following the principal from above:
=SUMPRODUCT(N(MONTH(A1:A40)=11)*(YEAR(A1:A40)=2009 ))
Micky


"gooders" wrote:

Sorry further to above I know that I can use the following:

=COUNT(IF(MONTH(A1:A100)=11,1,"")) as an array formula but I want to be able
to differentiate also between years, i.e. November 2009 and November 2010 etc.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Counting specific dates


That's great Mickey, many thanks, better than my formula, but now I want to
take it a step further and differentiate between months and years, i.e. count
all the months with a certain year.

Lesley

"מיכאל (מיקי) אבידן" wrote:

Try: =SUMPRODUCT(N(MONTH(A1:A40)=11))
where A1:A40 holds the different dates
Micky

"gooders" wrote:

Hi, this seems to be a very simple query but obviously too hard for my brain.
I have a column full of dates i.e.22/11/2009, 1/12/2009 etc. I may have
duplicates which isn't a problem. What I want to do is count the number of
rows that say were done in the month of November etc. I use Excel 2003.

Many thanks for any assistance.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Counting specific dates

I think I've got it using Mickey's formula:

=SUMPRODUCT(N(MONTH($A$1:$A$40)=12),N(YEAR($A$1:$A $40)=2010))

Thanks

"gooders" wrote:

Hi, this seems to be a very simple query but obviously too hard for my brain.
I have a column full of dates i.e.22/11/2009, 1/12/2009 etc. I may have
duplicates which isn't a problem. What I want to do is count the number of
rows that say were done in the month of November etc. I use Excel 2003.

Many thanks for any assistance.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Counting specific dates

Why the N() function ?
--
David Biddulph

"????? (????) ?????" <micky-a*at*tapuz.co.il wrote in message
...
Following the principal from above:
=SUMPRODUCT(N(MONTH(A1:A40)=11)*(YEAR(A1:A40)=2009 ))
Micky


"gooders" wrote:

Sorry further to above I know that I can use the following:

=COUNT(IF(MONTH(A1:A100)=11,1,"")) as an array formula but I want to be
able
to differentiate also between years, i.e. November 2009 and November 2010
etc.



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Counting specific dates

Replace MONTH with YEAR and 11 with 2009
=SUMPRODUCT(N(YEAR(A1:A40)=2009))
Micky


"gooders" wrote:


That's great Mickey, many thanks, better than my formula, but now I want to
take it a step further and differentiate between months and years, i.e. count
all the months with a certain year.

Lesley

"מיכאל (מיקי) אבידן" wrote:

Try: =SUMPRODUCT(N(MONTH(A1:A40)=11))
where A1:A40 holds the different dates
Micky

"gooders" wrote:

Hi, this seems to be a very simple query but obviously too hard for my brain.
I have a column full of dates i.e.22/11/2009, 1/12/2009 etc. I may have
duplicates which isn't a problem. What I want to do is count the number of
rows that say were done in the month of November etc. I use Excel 2003.

Many thanks for any assistance.



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Counting specific dates

Please note that if you have more(!) than one segment using SUMPRODUCT - you
can omit all the "N"s.
SUMPRODUCT cannot calculate on TRUEs and FALSEs
However, if two, or more segments, of T & F are multiplied - the result is
always 0 or 1 which is very welcome by the function.
So: =SUMPRODUCT((MONTH($A$1:$A$40)=12)*(YEAR($A$1:$A$4 0)=2010)) will do
*** Please note the Multiplication instead your comma ***
Micky
--
והמשך/י, *א, לקרוא את השורה הבאה:
***********
אם תגובתי עזרה לחץ/י, *א, על <כן בפס האופקי התחתון!
***********
מיכאל אבידן
מ*הל פורום "אופיס" ב"תפוז"
[Microsoft" Most Valuable Professional [MVP"


"gooders" wrote:

I think I've got it using Mickey's formula:

=SUMPRODUCT(N(MONTH($A$1:$A$40)=12),N(YEAR($A$1:$A $40)=2010))

Thanks

"gooders" wrote:

Hi, this seems to be a very simple query but obviously too hard for my brain.
I have a column full of dates i.e.22/11/2009, 1/12/2009 etc. I may have
duplicates which isn't a problem. What I want to do is count the number of
rows that say were done in the month of November etc. I use Excel 2003.

Many thanks for any assistance.

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
Counting dates with specific criteria Steve Excel Worksheet Functions 1 December 5th 09 10:27 PM
Counting records in a column range occuring between specific dates Jeremy Prosser New Users to Excel 4 January 24th 09 04:14 AM
counting occasions dates occur between 2 dates hoyt New Users to Excel 5 June 16th 06 08:11 AM
Counting occurences of a specific day between two dates coal_miner Excel Worksheet Functions 1 April 20th 05 03:37 PM
Counting columns and specific Dates JulieD Excel Worksheet Functions 2 November 12th 04 01:13 PM


All times are GMT +1. The time now is 05:57 PM.

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

About Us

"It's about Microsoft Excel"