# 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.

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.

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")

1,078,491
Messages
5,340,683
Members
399,389
Latest member
JayNExcel

### This Week's Hot Topics

• Problem with Radio Button's format control
I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
• Last Display on userform to a Listbox
[CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
• Rename and move files to a new location
Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
• Help with True/False Formula
Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
• Clear extra characters from a provided range of cells
Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
• Help with Current and highest streaks
Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...