#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Counting dates

I have a list of dates ranging from 9/1/2007 to 3/31/2008. I'd like
to create a function that would count for each month, is that
possible? Example, count only those dates in November 2007
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting dates

One way...

A1 = 9/1/2007
B1 = 3/31/2008

=SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&B1)),"mmm/yy")="Nov/07"))

--
Biff
Microsoft Excel MVP


"tonyalt3" wrote in message
...
I have a list of dates ranging from 9/1/2007 to 3/31/2008. I'd like
to create a function that would count for each month, is that
possible? Example, count only those dates in November 2007



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Counting dates

On Apr 16, 4:39*pm, "T. Valko" wrote:
One way...

A1 = 9/1/2007
B1 = 3/31/2008

=SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&B1)),"mmm/yy")="Nov/07"))

--
Biff
Microsoft Excel MVP

"tonyalt3" wrote in message

...



I have a list of dates ranging from 9/1/2007 to 3/31/2008. *I'd like
to create a function that would count for each month, is that
possible? *Example, count only those dates in November 2007- Hide quoted text -


- Show quoted text -


What if all dates are in Column A?
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting dates

Ooops! Sorry, I'm a bit under the weather today and can't seem to think
straight!

I interpreted your post to mean you had just the 2 dates, a start date and
then an end date.

Ok, let's assume your dates are in the range A1:A100.

=SUMPRODUCT(--(TEXT(A1:A100,"mmm/yy")="Nov/07"))


--
Biff
Microsoft Excel MVP


"tonyalt3" wrote in message
...
On Apr 16, 4:39 pm, "T. Valko" wrote:
One way...

A1 = 9/1/2007
B1 = 3/31/2008

=SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&B1)),"mmm/yy")="Nov/07"))

--
Biff
Microsoft Excel MVP

"tonyalt3" wrote in message

...



I have a list of dates ranging from 9/1/2007 to 3/31/2008. I'd like
to create a function that would count for each month, is that
possible? Example, count only those dates in November 2007- Hide quoted
text -


- Show quoted text -


What if all dates are in Column A?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Counting dates

Try:

=SUMPRODUCT((MONTH(A1:A1000)=11)*(YEAR(A1:A1000)=2 007))

for January you have to also check for empty cells otherwise it will return
false positives:

=SUMPRODUCT((A1:A1000<"")*(MONTH(A1:A1000)=1)*(YE AR(A1:A1000)=2007))

Adjust rabges to suit your requirements but note that you can't use whole
columns.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"tonyalt3" wrote in message
...
I have a list of dates ranging from 9/1/2007 to 3/31/2008. I'd like
to create a function that would count for each month, is that
possible? Example, count only those dates in November 2007





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Counting dates

On Wed, 16 Apr 2008 14:15:30 -0700 (PDT), tonyalt3 wrote:

I have a list of dates ranging from 9/1/2007 to 3/31/2008. I'd like
to create a function that would count for each month, is that
possible? Example, count only those dates in November 2007


If your list of dates is in Column A; and some date in the month of November
2007 is in B1, then:

=COUNTIF(A:A,"="&B1-DAY(B1)+1)-
COUNTIF(A:A,""&B1-DAY(B1)+32-DAY(B1-DAY(B1)+32))

--ron
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 MikeG Excel Worksheet Functions 6 December 19th 07 08:53 PM
Counting Dates Daoud Fakhry Excel Discussion (Misc queries) 3 July 15th 07 02:44 PM
counting occasions dates occur between 2 dates hoyt New Users to Excel 5 June 16th 06 08:11 AM
Counting dates, within a list of dates jrheinschm Excel Worksheet Functions 7 April 19th 06 06:13 PM
counting dates jeremy via OfficeKB.com New Users to Excel 1 August 12th 05 02:03 AM


All times are GMT +1. The time now is 12:17 AM.

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"