Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tom tom is offline
external usenet poster
 
Posts: 570
Default Countif and dates

I need to count datess in a column if they occur in a specific month and year.

Can anyone help?
--
Tom
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Countif and dates

Put some dates in A1 thru A30:

11/13/2008
11/10/2007
9/2/2007
3/17/2008
5/1/2007
7/9/2008
1/7/2007
10/5/2008
8/27/2007
11/10/2007
6/5/2007
3/21/2007
3/27/2008
5/17/2007
5/2/2008
3/23/2007
10/18/2008
4/6/2008
2/14/2007
12/5/2008
7/3/2007
4/26/2007
9/21/2008
8/23/2008
8/25/2007
6/7/2007
3/3/2007
8/10/2008
8/12/2007
9/4/2008

then

=SUMPRODUCT(--(YEAR(A1:A30)=2007),--(MONTH(A1:A30)=5))

will give you the count for May 2007
--
Gary''s Student - gsnu200769


"Tom" wrote:

I need to count datess in a column if they occur in a specific month and year.

Can anyone help?
--
Tom

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Countif and dates

=SUMPRODUCT(--(MONTH(A1:A100)=2),--(YEAR(A1:A100)=2008)


"Tom" wrote:

I need to count datess in a column if they occur in a specific month and year.

Can anyone help?
--
Tom

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tom tom is offline
external usenet poster
 
Posts: 570
Default Countif and dates

Thanks to both of you.
--
Tom


"Teethless mama" wrote:

=SUMPRODUCT(--(MONTH(A1:A100)=2),--(YEAR(A1:A100)=2008)


"Tom" wrote:

I need to count datess in a column if they occur in a specific month and year.

Can anyone help?
--
Tom

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Countif and dates

Another one:

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

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

Tom wrote:

I need to count datess in a column if they occur in a specific month and year.

Can anyone help?
--
Tom


--

Dave Peterson
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
COUNTIF with dates Jock Excel Worksheet Functions 4 June 18th 07 08:31 PM
CountIF with dates Secret Squirrel Excel Discussion (Misc queries) 13 November 15th 06 09:08 PM
COUNTIF using Dates WLMPilot Excel Worksheet Functions 1 October 7th 05 12:51 AM
Countif using dates Bugaglugs Excel Worksheet Functions 11 August 23rd 05 05:16 PM
countif and dates JAF New Users to Excel 2 December 3rd 04 04:45 PM


All times are GMT +1. The time now is 04:13 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"