Marius,
Attached is a modified version of your example file.
Row 1 is a header row
Actual data starts in row 2
Column D is the list of Event "1" times
Column E is the list of Event "2" times
Column F is their differences
In cell D2 and copied down to D31 is this formula (to get the list of Event "1" times):
=IF(ROWS(D$1:D1)>COUNTIF($B$2:$B$45,1),"",INDEX($A$2:$A$45,MATCH(1,INDEX((COUNTIF(D$1:D1,$A$2:$A$45)=0)*($B$2:$B$45=1),),0)))
In cell E2 and copied down to E31 is this formula (to get the list of Event "2" times):
=IF(ROWS(E$1:E1)>COUNTIF($B$2:$B$45,2),"",INDEX($A$2:$A$45,MATCH(1,INDEX((COUNTIF(E$1:E1,$A$2:$A$45)=0)*($B$2:$B$45=2),),0)))
In cell F2 and copied down to F31 is this formula (to get their differences):
=IF(COUNT(D2:E2)<2,"",E2-D2)
Cells D2:F31 are formatted as [h]:mm:ss
Does that work for you?
Bookmarks