Adding up in time intervals

woollyg

New Member
Joined
Feb 26, 2018
Messages
4
Hi there,

I'm trying to add bits of data up in the table below so I can see the total at different 15 minute intervals and then plot it onto a graph, I've tried using sum and sumifs but the formula doesn't seem to work! Any help would be very much appreciated.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Number[/TD]
[/TR]
[TR]
[TD]10:00[/TD]
[TD]10:05[/TD]
[TD]56
[/TD]
[/TR]
[TR]
[TD]07:00[/TD]
[TD]12:00[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]10:00[/TD]
[TD]10:15[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]07:00[/TD]
[TD]09:00[/TD]
[TD]36[/TD]
[/TR]
[TR]
[TD]10:00[/TD]
[TD]12:00[/TD]
[TD]16[/TD]
[/TR]
</tbody>[/TABLE]

I would then like to have the time in a column such as 07:00, 07:15, 07:30.... and then in the adjacent column add up the numbers if it is within the range of time intervals.

Thanks for any help!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I have your original table in A1:C6. Then, beginning in E2 and copied down, I have all of the 15 minute intervals from midnight - 11:45pm. Then, the formula in F2 is below, then copied down.

Code:
=SUMPRODUCT((E2>=$A$2:$A$6)*(E2<=$B$2:$B$6)*($C$2:$C$6))
 
Upvote 0
That's great thanks very much, please may you explain to me what the sumproduct does to the array of data because i have never used it before!
 
Upvote 0
(E2>=A2:A6) and (E2<=A2:A6) are looking at your times and seeing if E2 is between those times. Those two things are multiplied against eachother to get an array of ones and zeroes. The ones are true and the zeroes are false. Then it multiplies that against C2:C6. Anything that had a 1 will now have a value of the corresponding value from C2:C6. Then it adds all of those values together and returns the sum. That's where the name SumProduct comes from. It is giving you the sum of the product of the arguments that you enter into the formula.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,628
Members
452,661
Latest member
Nonhle

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