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.
Start TimeEnd TimeNumber
10:0010:0556
07:0012:0012
10:0010:1524
07:0009:0036
10:0012:0016

<tbody>
</tbody>

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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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,214,534
Messages
6,120,084
Members
448,943
Latest member
sharmarick

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