Sumif for range of time

30percent

Board Regular
Joined
May 5, 2011
Messages
123
Office Version
  1. 2016
Platform
  1. Windows
=Sumif(B:B, "(>5/31/2011 5:00:00 PM) AND (<5/31/2011 11:59:59 PM)", E:E)

Hi,

on column B, I have TIME OF ORDER PLACED, and on column E, I have Quantity of Order. I tried to sum up the amount of orders placed from 5pm to 11:59pm using the formula above but I'm getting zero as a result. Can anyone please point out, why the formula is not working or why it is summing to zero?

type of data I have on column B is 5/31/2011 5:00:00 PM.
type of data I have on column E is 1000

Thank you for your help!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You can't use AND in SUMIF but you could use two SUMIF formulas like this, i.e. specifically for those time periods try

=SUMIF(B:B,">5/31/2011 5:00:00 PM",E:E)-SUMIF(B:B,">=6/1/2011",E:E)

or if all the values are on that date prehaps just sum the rows where the hour is >=17, i.e.

=SUMPRODUCT((HOUR(B2:B100)>=17)+0,E2:E100)
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,448
Members
452,915
Latest member
hannnahheileen

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