Hello All,

I'm trying to see if it's possible to use the Countif and Sumif formula between 2 date/time ranges without having to manually type in the date and time.
I have sample data consisting of the number of phone calls received on 5/5/2013 between 12:00 AM and 6:00 AM.
I want to break up the data by hour and count how many phone calls were received each hour, and the average phone call time per hour.

Currently the formulas I'm using are:
=COUNTIFS(B:B,">=5/5/13 12:00 AM",B:B,"<=5/5/13 12:59 AM")
=SUMIFS(D:D,B:B,">=5/5/13 12:00 AM",B:B,"<=5/5/13 12:59 AM")

But if my data is across a 24 hour period and across months of data, manually changing the dates would be difficult.
I tried placing the Date/Time range into a cell and referencing the cell so I can drag the formula down, but I believe I'm missing a character to complete the formula..

What I want to use or if anyone could help come up with a better formula?
=COUNTIFS(B:B,">= F12",B:B,"<= G12")
=SUMIFS(D:D,B:B,">=F12",B:B,"<=G12")

I have attached a sample wks. The table highlighted in yellow is where I manually typed in the formulas, and the table in red is where I was trying to test the formula.

Test Data.xlsx

Regards,
Andy