Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jeremy
 
Posts: n/a
Default How do I count occurences in a date range?

I have a table of data of closed accounts. In that table, I have a column
including the cancellation date. I want to count the number of cases that
cancelled in Jan, Feb, etc. I've tried combinations of "countif", "and" and
<=, = in all my formulas but I keep getting 0 as my result.
  #2   Report Post  
RagDyeR
 
Posts: n/a
Default

One way:

=SUMPRODUCT(--(MONTH(A1:A50)=1))

Where the *number* of the month (Jan=1, Feb=2, ...etc.) is in the formula

OR

=SUMPRODUCT(--(MONTH(A1:A50)=C1))

Where the number of the month is entered into another cell, so that it can
be easily changed to count other months.

If your list is multi-year, you may want to add a specific year to further
classify the count:


=SUMPRODUCT((MONTH(A1:A50)=1)*(YEAR(A1:A50)=2005))

OR

=SUMPRODUCT((MONTH(A1:A50)=C1)*(YEAR(A1:A50)=C2))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Jeremy" wrote in message
...
I have a table of data of closed accounts. In that table, I have a column
including the cancellation date. I want to count the number of cases that
cancelled in Jan, Feb, etc. I've tried combinations of "countif", "and" and
<=, = in all my formulas but I keep getting 0 as my result.


  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

That first one can give misleading results if there are empty cells in the
range.

=SUMPRODUCT(--(MONTH(A1:A50)=1),--(A1:A500))

Is one way around it.

RagDyeR wrote:

One way:

=SUMPRODUCT(--(MONTH(A1:A50)=1))

Where the *number* of the month (Jan=1, Feb=2, ...etc.) is in the formula

OR

=SUMPRODUCT(--(MONTH(A1:A50)=C1))

Where the number of the month is entered into another cell, so that it can
be easily changed to count other months.

If your list is multi-year, you may want to add a specific year to further
classify the count:

=SUMPRODUCT((MONTH(A1:A50)=1)*(YEAR(A1:A50)=2005))

OR

=SUMPRODUCT((MONTH(A1:A50)=C1)*(YEAR(A1:A50)=C2))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"Jeremy" wrote in message
...
I have a table of data of closed accounts. In that table, I have a column
including the cancellation date. I want to count the number of cases that
cancelled in Jan, Feb, etc. I've tried combinations of "countif", "and" and
<=, = in all my formulas but I keep getting 0 as my result.


--

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
Formula to count number of days in range which are less than today zooming Excel Worksheet Functions 2 June 21st 05 04:01 PM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM
count weekdays in a date range benb Excel Worksheet Functions 1 January 13th 05 02:49 PM
How can I sum information in a list with a date range? Dave Excel Worksheet Functions 2 November 23rd 04 08:17 PM
Excel: How to return count for each cell within date range criter. Louisa Excel Worksheet Functions 0 November 5th 04 11:58 AM


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