Hi KL
It works now. Thanks.
By the way my first data was just an ex. and I tried to use your tip
according to my own data but that did not come out right.
Susanne
"KL" wrote:
Hi Susanne,
It does not work.
What do you mean it does not work? What error do you get?
Here is a little more of what my worksheet looks like
One possible cause of the problem I see is that have totally chaged both the
data and the conditions since your last post:
The sample data provided previously showed:
1) Dates in 2004 Vs. 2005 in the new example
2) Date Start & Date Finish looked like contiguous columns Vs. [A] & [K] in
the new example
3) The condition was to find dates in November Vs. January in the new
example.
Obviously, the formula needs to be adjusted to these changes.
Based on the new sample, try the following formula to produce the count for
dates in January.
=SUMPRODUCT((MONTH($A$2:$A$10)=1)*(YEAR($A$2:$A$10 )=2005)*((MONTH($K$2:$K$10)<1)+(YEAR($K$2:$K$10)< 2005)0))
If you want to do the same for several months/years just substitute the
values with the reference to cells that contain the parameters:
=SUMPRODUCT((MONTH($A$2:$A$10)=A14)*(YEAR($A$2:$A$ 10)=B14)*((MONTH($K$2:$K$10)<A14)+(YEAR($K$2:$K$1 0)<B14)0))
where [A14] contains the number of month and [B14] the year.
Noow you can fill the cells from [A15] to [A25] with rest of month numbers,
[B15] to [B25] with the year and copy the formula down.
Regards,
KL
|