How to sumif values between two times

Posted on


I have a list of contracts that run for a month, each line is a separate contract that is active during this times. I need to know what is the sum value between 00:00 and 01:00 (which is 8). What formula can I use. I tried sumif but the problem is that I can’t figure out how to include the values for lines as 00:00 to 00:00 which means this contract runs for 24 hours and also contract starting at 23:00 preceding day till 05:00.

start  end   value
00:00  05:00   5
05:00  10:00   5
23:00  05:00   2
00:00  00:00   1

Thank you,


Perhaps, this formula can help you:


enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *