to sum time basis date

vinod9111

Active Member
Joined
Jan 21, 2009
Messages
426
Hi All,

Looking your help for constructing the formula. I have a data which looks like below . In the date field there are dates and time
Date Time spent in minutes
11/06/2017 10:162
11/06/2017 10:152
11/06/2017 10:142
11/06/2017 10:112
11/06/2017 9:422
11/06/2017 9:332
11/06/2017 9:242
11/06/2017 9:172
11/04/2017 19:062
11/04/2017 16:522
11/04/2017 16:522
11/04/2017 16:422
11/04/2017 16:422
11/04/2017 16:42

<tbody>
</tbody>

The out put sheet has below format , I need to sum up the time basis the time slab given for the date which I need, please help me construct the formula
Time slabTime
9:30 AM10:30 AM
10:31 AM11:30 AM
11:31 AM12:30 PM
12:31 PM1:30 PM
1:31 PM2:30 PM
2:31 PM3:30 PM
3:31 PM4:30 PM
4:31 PM5:30 PM
5:31 PM6:30 PM
6:31 PM7:30 PM
7:31 PM8:30 PM
8:31 PM9:30 PM
9:31 PM10:30 PM
10:31 PM11:30 PM
11:31 PM12:30 AM

<tbody>
</tbody>

regards
Vinod
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Sheet2 C1=date.
Eg: C1=11/7/2017

Formula in Sheet2 in C2, then drag down.

=SUMPRODUCT((Sheet1!$A$2:$A$15>=Sheet2!$C$1+Sheet2!A2)*(Sheet1!$A$2:$A$15<=Sheet2!$C$1+Sheet2!B2)*Sheet1!$B$2:$B$15)
 
Upvote 0
Thanks KVSrinivasamurthy for your instant reply.

But sumproduct makes my pc slow, is there any other alternative formula to retrieve the desired result.

regards.

Vinod
 
Upvote 0
Try this

=SUMIFS(Sheet1!$B$2:$B$15,Sheet1!$A$2:$A$15,">="&Sheet2!$C$1+Sheet2!A2,Sheet1!$A$2:$A$15,"<="&Sheet2!$C$1+Sheet2!B2)
 
Upvote 0

Forum statistics

Threads
1,215,398
Messages
6,124,688
Members
449,179
Latest member
kfhw720

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