Count between dates

M

mike.kriiger

in Column A I have dates. Column D also has Dates.

Column A are Dates entered Column D are Mitigated Dates

What I am trying to do is count the Dates between 01/01/09 anf 31/01/09 in
Column D but only if The Dates in Column A are within the same Parameters

Dates Entered Mitigated Date
01/01/09 13/03/09
01/02/09 23/01/09
25/01/09 15/01/09
14/01/09 13/03/09


Answer = 1

Thank you for your assistance
 
B

Bob Phillips

=SUMPRODUCT(--(A2:A200>=--"2009-01-01"),--(A2:A200<"2009-02-01"),--(D2:D200>=--"2009-01-01"),--(D2:D200<"2009-02-01"))
 
P

Pete_UK

Here's one way of doing it:

=SUMPRODUCT((A25:A28>=--"1/1/09")*(A25:A28<=--"31/1/09")*
(D25:D28>=--"1/1/09")*(D25:D28<=--"31/1/09"))

(adjust the ranges to suit).

However, it would be better to put the start date and end date in
separate cells (eg G1 and H1), and the formula can then become:

=SUMPRODUCT((A25:A28>=G1)*(A25:A28<=H1)*(D25:D28>=G1)*(D25:D28<=H1))

Note that I have assumed that you want to include the start and end
dates within the testing range, hence >= and <= rather than just > and
<

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top