Sum cells included in time frame

Zanael

New Member
Joined
Oct 6, 2015
Messages
12
Hello there !

I have a very simple excel file with time in column A (format hh:MM AM/PM) and dollar value in column B (pretty much time of transaction and amount received)

I m trying to add cells from column B ($) that are included between 10:00 AM and 10:59AM, then add those between 11:00AM and 11:59 AM, etc...

I ve looked for an answer in older posts; solution seems to include "sumproduct"...but i m having a hard time.

Any help would be greatly appreciated !!!


Aurélien
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try something like this...

=sumifs(sum-range,time-range, ">=10/24",time-range,"<11/24")
 
Upvote 0
Hi Zanael,

Maybe something like the below setup could help?

F2:
Code:
=SUMPRODUCT($B$2:$B$19,--(($A$2:$A$19>=$D2)*($A$2:$A$19<=$E2)))

Or like FDibbins suggested F2:
Code:
=SUMIFS($B$2:$B$19,$A$2:$A$19,">="&$D2,$A$2:$A$19,"<="&$E2)

TimeAmountStart TimeEnd TimeSum of Amount
12:00 AM 974.0012:00 AM12:59 AM $ 1,502.00
12:01 AM 294.001:00 AM1:59 AM $ 1,663.00
12:59 AM 234.002:00 AM2:59 AM $ 1,462.00
1:00 AM 195.003:00 AM3:59 AM $ -
1:01 AM 652.004:00 AM4:59 AM $ -
1:59 AM 816.005:00 AM5:59 AM $ -
2:00 AM 257.006:00 AM6:59 AM $ -
2:01 AM 458.007:00 AM7:59 AM $ -
2:59 AM 747.008:00 AM8:59 AM $ -
12:00 PM 73.009:00 AM9:59 AM $ -
12:01 PM 675.0010:00 AM10:59 AM $ -
12:59 PM 791.0011:00 AM11:59 AM $ -
1:00 PM 950.0012:00 PM12:59 PM $ 1,539.00
1:01 PM 633.001:00 PM1:59 PM $ 2,570.00
1:59 PM 987.002:00 PM2:59 PM $ 1,439.00
2:00 PM 814.003:00 PM3:59 PM $ -
2:01 PM 625.004:00 PM4:59 PM $ -
2:59 PM 249.005:00 PM5:59 PM $ -
6:00 PM6:59 PM $ -
7:00 PM7:59 PM $ -
8:00 PM8:59 PM $ -
9:00 PM9:59 PM $ -
10:00 PM10:59 PM $ -
11:00 PM11:59 PM $ -

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,315
Members
449,218
Latest member
Excel Master

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