So guys, Im trying to find how many time the hh:mm(column a) occurs between the given range (15-minute intervals in column b and column c). I'm dealing specifically with time format.
column b value should be >= and column c should be <
I was playing around with countif and countifs functions, but I see that under range parameter, you can choose one column. I have my ranges in two columns as shown:
Intended result in column d is shown in BOLD.
0:00:00 0:00:00 0:15:00 2
0:10:00 0:15:00 0:30:00 3
0:20:00 0:30:00 0:45:00 5
0:20:00 0:45:00 1:00:00
0:20:00 1:00:00 1:15:00
0:30:00 1:15:00 1:30:00
0:30:00 1:30:00 1:45:00
0:30:00 1:45:00 2:00:00
0:40:00 2:00:00 2:15:00
0:40:00 2:15:00 2:30:00
1:05:00 2:30:00 2:45:00
1:05:00 2:45:00 3:00:00
1:40:00 3:00:00 3:15:00
1:45:00 3:15:00 3:30:00
1:45:00 3:30:00 3:45:00
So i played around with the following array formula:
{=SUM((HOUR($C$2:$C$17)=HOUR(K2))*(MINUTE($C$2:$C$17)>=MINUTE(K2))*(MINUTE($C$2:$C$17)<MINUTE(L2)))}
it gives correct results until the row where it has 1:45:00 - 2:00:00. I think because I'm using hour value of K2 which in this case it's 1 and it checks between 1:45:00 and 1:00:00.
how can I correct this?
thanks
Bookmarks