Is the main logic seeking timestamps of every change in Weather AND Road condition?
Try to compare column G and H, row by row like this:
($G$5:$G$14<>$G$6:$G$15)/($H$5:$H$14<>$H$6:$H$15)
Then mark row with row index:
ROW($G$5:$G$14)/($G$5:$G$14<>$G$6:$G$15)/($H$5:$H$14<>$H$6:$H$15)+1
equals {6;#DIV/0!;#DIV/0!;9;#DIV/0!;#DIV/0!;12;#DIV/0!;#DIV/0!;15} with the timestamp starts at row 6,9,12,15
To get the first smallest value (6)
AGGREGATE(15,6,ROW($G$5:$G$14)/($G$5:$G$14<>$G$6:$G$15)/($H$5:$H$14<>$H$6:$H$15)+1,ROW(1:1))
Then Index column A:
In A23:
=IFERROR(INDEX($A$1:$A$15,AGGREGATE(15,6,ROW($G$5:$G$14)/($G$5:$G$14<>$G$6:$G$15)/($H$5:$H$14<>$H$6:$H$15)+1,ROW(1:1)))-1/1440,"")
Drag down as far as needed.
In B23:
=IF(A23="","",IF(A24="",MAX($A$6:$A$14),A23))
In C23, then copy to D23:
=IF($A23="","",INDEX(G$6:G$14,MATCH($A23+1/1440,$A$6:$A$14,0)))
Drag all down.
All assum that time in column A is increasing with no gap.
Bookmarks