SUMIF() between h:mm to another h:mm.

dillonl14

New Member
Hey everyone,

I work for a trucking company and I'm trying to the sum of certain shipments between a give hour window. I have the list of times when a shipments comes in and I have the weight. I want to know how to find the some of, say... all the shipments that fell within the 10:00pm and 11:00pm window. The time list is formatted in military time, but idk if that matters.

Please help!

Thank you all.
 

barjoman

Board Regular
Hey everyone,

I work for a trucking company and I'm trying to the sum of certain shipments between a give hour window. I have the list of times when a shipments comes in and I have the weight. I want to know how to find the some of, say... all the shipments that fell within the 10:00pm and 11:00pm window. The time list is formatted in military time, but idk if that matters.

Please help!

Thank you all.
Hello and Welcome.

Assuming your Weights are in column A and your times are in column B:

Code:
=SUMIFS(A:A,B:B,">="&2200,B:B,"<"&2300)
What the above formula is doing is summing all the values in column A (your weights) where column B (your time) is greater then equal to 10pm (2200 military time) AND less than 11pm (2300 military time). If you want to include 11pm then change "<"&2300 to "<="&2300

Let me know if it doesn't work or if this is not what you wanted to do.
 

dillonl14

New Member
Hello and Welcome.

Assuming your Weights are in column A and your times are in column B:

Code:
=SUMIFS(A:A,B:B,">="&2200,B:B,"<"&2300)
What the above formula is doing is summing all the values in column A (your weights) where column B (your time) is greater then equal to 10pm (2200 military time) AND less than 11pm (2300 military time). If you want to include 11pm then change "<"&2300 to "<="&2300

Let me know if it doesn't work or if this is not what you wanted to do.




Perfect! That worked, however, I had to change the formula around a little in order for it to work with my spreadsheet, but thank you so much! Here is the working formula: =SUMIFS(A4:A33,B4:B33,">=22:00",B4:B33,"<23:00")
 

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Syntax errors
    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: [code=rich]Syntax Error: Function...
Top