Working w/ Date and Time in SUMIF

C

carl

I am pulling in date/time from another application and am
trying to use it in a SUMIF function. I am trying to sum
all my product sales given a time bracket. My date/time
data looks like this:

2004/03/04 16:01:43.000
2004/03/04 16:01:43.000
2004/03/04 16:01:40.000
2004/03/04 16:01:40.000
2004/03/04 16:01:16.000
2004/03/04 16:01:16.000
2004/03/04 16:01:12.000
2004/03/04 16:01:12.000

For example, I would like the SUMIF function to sum if the
time is between 16:01:15 and 16:01:30.

Thank You in Advance
 
F

Frank Kabel

Hi
if your date/time is in column A (and is not a text but a date/time
value) and your product sales in column B try the following
=SUMPRODUCT(((A1:A1000-INT(A1:A1000))>=TIME(16,1,15))*((A1:A1000-INT(A1
:A1000))<=TIME(16,1,30)),B1:B1000)
 

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