ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count cells within a date range (https://www.excelbanter.com/excel-discussion-misc-queries/105938-count-cells-within-date-range.html)

Dewayne

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

Biff

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




JMB

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


Don Guillett

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




Dave Peterson

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

Don Guillett

Count cells within a date range
 
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

Count cells within a date range
 
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

Dewayne

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



All times are GMT +1. The time now is 02:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com