# Thread: sumif with a time range

1. Registered User
Join Date
Apr 2004
Posts
173

## Unanswered: sumif with a time range

I have a table of values that have pounds and time stamps from a production facility approx 20,000 rows. I'm looking for a formula to sum the pounds in a time range. Specifically a formulat that says sumif(A:A, "or(< 12:00AM, > 2:35PM)", C:C) of course that doesn't work (at least for me).

I'm using excel 2003, does anyone have any suggestions?

2. Registered User
Join Date
Sep 2008
Location
London, UK
Posts
511
Hi,

I am pretty sure that you can do this with SUMIF() but I'm not clear on your criteria.
Specifically a formulat that says sumif(A:A, "or(< 12:00AM, > 2:35PM)", C:C)
Time in a day cannot be less than 12am? Are there dates involved too? Please clarify.

If that should read 12:00PM then here are some examples of OR conditions with SUMIF():
Code:
`=SUM(SUMIF(A:A,{"<12:00",">14:35"},C:C))`
Code:
`=SUMIF(A:A,"<12:00",C:C)+SUMIF(A:A,">14:35",C:C)`
Code:
```=SUMPRODUCT(SUMIF(A:A,F2:F3,C:C))

where F2 contains <12:00 and F3 contains >14:35```
Last edited by Colin Legg; 08-02-10 at 18:22.

3. Registered User
Join Date
Aug 2010
Posts
1
I was trying to do something similar and

Code:
`=SUMIF(A:A,"<12:00",C:C)+SUMIF(A:A,">14:35",C:C)`
worked perfectly. Thanks!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•