Hi there, i have a table of data that has times from 00:00:00 to 23:59:00 with volumes of power usage for 5 minute intervals. I am trying to use a sumif function to sum peak and offpeak amounts using time:

Peak = SUMIFS(Mvmt!F3:F8353,Mvmt!$B$3:$B$8353,">=07:00:00",Mvmt!$B$3:$B$8353,"<=20:59:00")
Where column F= is my usage to sum and column B = the 5 minute time interval.

Offpeak = SUMIFS(Mvmt!F3:F8353,Mvmt!$B$3:$B$8353,">=21:00:00",Mvmt!$B$3:$B$8353,"<=06:59:00")

I suspect it has something to do with a 24 hour clock and it not knowing that 00:00 is after 23:00 but cant work a better formula.

Any ideas?

Ta