Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Count cells within a date range

Is there a way to count only the cells that fall within a defined date range?
Example:
Count only the number of cells in a range that fall within the date range of
7/01/06 through 7/31/o6.
Thanks for any help
--
Dewayne
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Count cells within a date range

Hi!

One way:

=COUNTIF(A:A,"=7/1/2006")-COUNTIF(A:A,"7/31/2006")

Better to use cells to hold the criteria:

B1 = 7/1/2006
C1 = 7/31/2006

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

Format the cell as GENERAL

Biff

"Dewayne" wrote in message
...
Is there a way to count only the cells that fall within a defined date
range?
Example:
Count only the number of cells in a range that fall within the date range
of
7/01/06 through 7/31/o6.
Thanks for any help
--
Dewayne



  #3   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Count cells within a date range

where your data is in A1:A10, and B1:B2 contain 7/1/06 and 7/31/06, try:

=COUNTIF(A1:A10, "="&B1) - COUNTIF(A1:A10, ""&B2)


"Dewayne" wrote:

Is there a way to count only the cells that fall within a defined date range?
Example:
Count only the number of cells in a range that fall within the date range of
7/01/06 through 7/31/o6.
Thanks for any help
--
Dewayne

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Count cells within a date range

how about
=SUMPRODUCT((MONTH(C2:C5)=7)*1)
--
Don Guillett
SalesAid Software

"Dewayne" wrote in message
...
Is there a way to count only the cells that fall within a defined date
range?
Example:
Count only the number of cells in a range that fall within the date range
of
7/01/06 through 7/31/o6.
Thanks for any help
--
Dewayne



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Count cells within a date range

And to avoid the 2005, 2004, 2003, ... dates

=sumproduct(--(text(c2:c5,"yyyymm")="200607"))


Don Guillett wrote:

how about
=SUMPRODUCT((MONTH(C2:C5)=7)*1)
--
Don Guillett
SalesAid Software

"Dewayne" wrote in message
...
Is there a way to count only the cells that fall within a defined date
range?
Example:
Count only the number of cells in a range that fall within the date range
of
7/01/06 through 7/31/o6.
Thanks for any help
--
Dewayne


--

Dave Peterson


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Count cells within a date range

Thank you to all of you for your suggestions
--
Dewayne


"Dave Peterson" wrote:

or

=SUMPRODUCT((YEAR(C2:C5)=2006)*(MONTH(C2:C5)=7))

For July <vbg!

Don Guillett wrote:

or
=SUMPRODUCT((YEAR(C2:C5)=2006)*(MONTH(C2:C5)=3))

--
Don Guillett
SalesAid Software

"Dave Peterson" wrote in message
...
And to avoid the 2005, 2004, 2003, ... dates

=sumproduct(--(text(c2:c5,"yyyymm")="200607"))


Don Guillett wrote:

how about
=SUMPRODUCT((MONTH(C2:C5)=7)*1)
--
Don Guillett
SalesAid Software

"Dewayne" wrote in message
...
Is there a way to count only the cells that fall within a defined date
range?
Example:
Count only the number of cells in a range that fall within the date
range
of
7/01/06 through 7/31/o6.
Thanks for any help
--
Dewayne

--

Dave Peterson


--

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
Count cells between a date range BradKopecky Excel Worksheet Functions 2 February 13th 06 08:57 PM
Count occurances in range of cells Ed Gregory Excel Worksheet Functions 1 September 7th 05 04:12 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
count date occurances in range of dates... Alex Excel Worksheet Functions 2 July 27th 05 04:15 PM
Character Count Range of Cells michimac Excel Discussion (Misc queries) 1 May 29th 05 11:26 PM


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