#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default counting months

I need to add all the months that are greater or equal to 6/01/09 but less
than 9/30/09. All the dates are in one column.
Example: 6/01/09 = 1
7/30/09 = 1
8/01/09 = 1
total = 3
Thanks for your help with this.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default counting months

=SUMPRODUCT(--(A2:A500=DATEVALUE("6/1/09")*(A2:A500<DATEVALUE("9/30/09"))))

"eubanj" wrote:

I need to add all the months that are greater or equal to 6/01/09 but less
than 9/30/09. All the dates are in one column.
Example: 6/01/09 = 1
7/30/09 = 1
8/01/09 = 1
total = 3
Thanks for your help with this.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default counting months

"Sean Timmons" wrote:
=SUMPRODUCT(--(A2:A500=DATEVALUE("6/1/09")*(A2:A500<DATEVALUE("9/30/09"))))


Either:

=SUMPRODUCT(--(A2:A500=DATEVALUE("6/1/09")),--(A2:A500<DATEVALUE("9/30/09")))

Or:

=SUMPRODUCT((A2:A500=DATEVALUE("6/1/09")) * (A2:A500<DATEVALUE("9/30/09")))

First, you do not need "--" if you are going to combine conditional
expressions with some other arithmetic operator (e.g. "*").

Second, your formula does not work because of misplaced parentheses. Test
with 10/1/2009 in some cell in A2:A500.

PS: Although DATEVALUE should work for this OP, since he used that date
form himself, I would prefer DATE(2009,6,1), since that is independent of
Regional and Language control settings.


----- original message -----

"Sean Timmons" wrote in message
...
=SUMPRODUCT(--(A2:A500=DATEVALUE("6/1/09")*(A2:A500<DATEVALUE("9/30/09"))))

"eubanj" wrote:

I need to add all the months that are greater or equal to 6/01/09 but
less
than 9/30/09. All the dates are in one column.
Example: 6/01/09 = 1
7/30/09 = 1
8/01/09 = 1
total = 3
Thanks for your help with this.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default counting months

With data arranged in this format; use the below formula in D1

Col A Col B Col C Col D
6/1/2009 6/1/2009 9/30/2009 =formula
7/30/2009
8/1/2009
--
--
--

=COUNTIF(A:A,"=" & B1)-COUNTIF(A:A,"=" & C1)


If this post helps click Yes
---------------
Jacob Skaria


"eubanj" wrote:

I need to add all the months that are greater or equal to 6/01/09 but less
than 9/30/09. All the dates are in one column.
Example: 6/01/09 = 1
7/30/09 = 1
8/01/09 = 1
total = 3
Thanks for your help with this.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default counting months

greater or equal to 6/01/09 but less than 9/30/09

I assume you mean you want to count *dates* that fall withn a date range.

One way...

Use cells to hold the boundary dates...

A1 = start date
B1 = end date

=COUNTIF(X1:X100,"="&A1)-COUNTIF(X1:X100,"="&B1)

--
Biff
Microsoft Excel MVP


"eubanj" wrote in message
...
I need to add all the months that are greater or equal to 6/01/09 but less
than 9/30/09. All the dates are in one column.
Example: 6/01/09 = 1
7/30/09 = 1
8/01/09 = 1
total = 3
Thanks for your help with this.






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 Consecutive Months in Top Third A.C.G.[_2_] Excel Worksheet Functions 1 March 7th 08 07:30 PM
Counting Number of Months in the Top 33% [email protected] Excel Discussion (Misc queries) 0 March 6th 08 06:35 PM
Counting Months jermsalerms Excel Worksheet Functions 4 June 5th 06 10:27 PM
Counting Months Farrel Excel Worksheet Functions 2 August 26th 05 06:51 PM
Counting months Aaron Howe Excel Worksheet Functions 5 July 11th 05 07:35 PM


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