counting occurances
For the between scenario, this formula is a bit shorter:
B1: =SUMPRODUCT((A1:A100(--"01/01/2003"))*(A1:A100<(--("01/01/2004"))))
Easiest, though, is to enter the min and max dates in separate cells and
reference them...
B1: (min date to include)
B2: (max date to include)
Count of dates between those 2 dates, inclusive:
B3: =SUMPRODUCT((A1:A100=B1)*(A1:A100<=B2))
Does that help?
***********
Regards,
Ron
XL2002, WinXP
"Ron Coderre" wrote:
For a list of dates in A1:A100
You have a couple options:
These formulas EXCLUDE 01/01/2003....
B1:
=SUMPRODUCT((A1:A100DATEVALUE("01/01/2003"))*(A1:A100<DATEVALUE("01/01/2004")))
or
B1: =COUNTIF(A1:A100,"<01/01/2004")-COUNTIF(A1:A100,"<=01/01/2003")
If you want the count of any dates within 2003....
B1: =SUMPRODUCT(--(YEAR(A1:A100)=2003))
Does that help?
***********
Regards,
Ron
XL2002, WinXP
"SR89" wrote:
Hi,
I can't figure out how to count how many occurances fall between two
dates. For example, how many of the dates in a column are Jan 01,
2003 and < Jan 01, 2004.
COUNTIF will count one occurance only, so I think that I have to use
maybe SUMPRODUCT but am now sure how the formula would work.
Any ideas?
Thanks,
--
SR89
|