Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
joe
 
Posts: n/a
Default how to count if the value falls between a date range

example
1/1/2005
1/2/2005 = 2
2/1/2005
2/2/2005 = 2

I am trying to get the ount if the value is between 1/12005 and 1/3/2005 and
similarly 2/1/2005 and 2/3/2005
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

=countif(a1:a10,"="&date(2005,1,1)) - countif(a1:a10,""&date(2005,1,3))

(I'm not sure what between means--include the end dates or not???)

joe wrote:

example
1/1/2005
1/2/2005 = 2
2/1/2005
2/2/2005 = 2

I am trying to get the ount if the value is between 1/12005 and 1/3/2005 and
similarly 2/1/2005 and 2/3/2005


--

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

Dave,

"Between" is inclusive of the beginning and end dates. This isn't
a very elegant solution, but it will work:

{=SUM(IF(A1:A4=DATE(2005,1,1),IF(A1:A4<=DATE(2005 ,1,3),1,0),0))}

Note: This is entered as an array formula, so make sure to hit
CTRL+SHIFT+ENTER after typing the formula in the cell.

HTH

Michael Cumming

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 for If Term is on Certain Date then Count Krisjhn Excel Worksheet Functions 3 August 30th 05 07:57 PM
Using sumproduct to count number by date JerryS Excel Worksheet Functions 2 June 6th 05 10:37 PM
Count cells based on date range in another column [email protected] New Users to Excel 1 May 5th 05 08:11 PM
Count the occurances of a month in a range of date fields Keith Brown Excel Worksheet Functions 8 March 14th 05 11:24 AM
Count data entries and date problem Gef Excel Worksheet Functions 5 November 4th 04 02:30 PM


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