Hi everyone,
I am looking to calculate from my dummy dataset over which hours of the day vehicles are deployed (between alert time and available time).
The dataset has 4 columns;
Incident number (column A) general format
Vehicle id (Column B) general format
Alert time (Column C) datetime (dd/mm/yyyy hh:mm:ss)
Available time (Column D) (dd/mm/yyyy hh:mm:ss)
I had successfully tried the below formula from a thread on another site; however I forgot to save it and i havent been able to get it to work since.
=MMULT(RANDARRAY(1,COUNT(Alert time column range),1,1,TRUE),BITAND({0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}<=Alert time column range,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}>=Alert time column range))
Link to original question where above formula came from - Find number of simultaneous activites from a list of times
The above formula produced a output of columns from 0 - 23 and showed a value of 1 if the alert time - available time fell within the hour number. I have replicated this manually on the image.
For example, the 1st row of data shows the vehicle times between 01:31:17 - 01:52:56. As this time range falls within hour 1, the 1 column has a value of 1.
In the 2nd row of data however, the vehicle time spans over 3 hour periods (9-10, 10-11 and 11-12) so columns 9, 10 and 11 all receive a value of 1.
I hope this makes sense and any help would be greatly appreciated.
I am looking to calculate from my dummy dataset over which hours of the day vehicles are deployed (between alert time and available time).
The dataset has 4 columns;
Incident number (column A) general format
Vehicle id (Column B) general format
Alert time (Column C) datetime (dd/mm/yyyy hh:mm:ss)
Available time (Column D) (dd/mm/yyyy hh:mm:ss)
I had successfully tried the below formula from a thread on another site; however I forgot to save it and i havent been able to get it to work since.
=MMULT(RANDARRAY(1,COUNT(Alert time column range),1,1,TRUE),BITAND({0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}<=Alert time column range,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}>=Alert time column range))
Link to original question where above formula came from - Find number of simultaneous activites from a list of times
The above formula produced a output of columns from 0 - 23 and showed a value of 1 if the alert time - available time fell within the hour number. I have replicated this manually on the image.
For example, the 1st row of data shows the vehicle times between 01:31:17 - 01:52:56. As this time range falls within hour 1, the 1 column has a value of 1.
In the 2nd row of data however, the vehicle time spans over 3 hour periods (9-10, 10-11 and 11-12) so columns 9, 10 and 11 all receive a value of 1.
I hope this makes sense and any help would be greatly appreciated.