count records in a date range

J

jiml

I have a worksheet in which I am trying to count the number of records in a
date range. For example, the Submit_Date column contains the following
dates/times (cells a1:a5):

12/17/2005 12:00:54 PM
12/16/2005 1:00:54 PM
12/17/2005 9:00:13 PM
12/10/2005 7:54:16 AM
12/17/2005 10:04:11 AM

I would like to count the number of records with a Submit_Date between
12/1/2005 12:00:00 PM and 12/31/2005 11:59:59 PM.

Any suggestions?
 
P

pinmaster

You can use SUMPRODUCT

=SUMPRODUCT((A1:A100>=B1)*(A1:A100<=B2))
A1:A100 ....date range
B1 start date
B2 end date

HTH
JG
 
B

Bob Phillips

Jim,

Try this

=SUMPRODUCT(--(A1:A5>=--"2005-12-01 12:00:00 PM"),--(A1:A5<=--"2005-12-31
11:59:59 PM"))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
J

jiml

Got it figured out, thanks for the help!
--
Jim


Bob Phillips said:
Jim,

Try this

=SUMPRODUCT(--(A1:A5>=--"2005-12-01 12:00:00 PM"),--(A1:A5<=--"2005-12-31
11:59:59 PM"))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Similar Threads

Average Time for Specific Item 10
Formatting time 2
Grouping Time in Pivots. 2
separating date and time 5
Looking for formula 20
SUMIF 5
INDEX MATCH SMALL 13
Problem formatting dates from CSV file 2

Top