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

dillonl14

New Member
Joined
Jun 28, 2016
Messages
2
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.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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.
 
Upvote 0
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")
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top